File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -78,11 +78,11 @@ class DisplayNames extends PureComponent {
78
78
}
79
79
80
80
return (
81
- // Tokenization of string only support 1 numberOfLines on Web
81
+ // Tokenization of string only support prop numberOfLines on Web
82
82
< Text
83
83
style = { [ ...this . props . textStyles , styles . pRelative ] }
84
84
onLayout = { this . setContainerLayout }
85
- numberOfLines = { 1 }
85
+ numberOfLines = { this . props . numberOfLines || undefined }
86
86
ref = { ( el ) => ( this . containerRef = el ) }
87
87
>
88
88
{ this . props . shouldUseFullTitle
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ function DisplayNames(props) {
8
8
< Text
9
9
accessibilityLabel = { props . accessibilityLabel }
10
10
style = { props . textStyles }
11
- numberOfLines = { props . numberOfLines }
11
+ numberOfLines = { props . numberOfLines || undefined }
12
12
>
13
13
{ props . fullTitle }
14
14
</ Text >
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ function ReportDetailsPage(props) {
62
62
const isPolicyAdmin = useMemo ( ( ) => PolicyUtils . isPolicyAdmin ( policy ) , [ policy ] ) ;
63
63
const shouldDisableSettings = useMemo ( ( ) => ReportUtils . shouldDisableSettings ( props . report ) , [ props . report ] ) ;
64
64
const shouldUseFullTitle = ! shouldDisableSettings ;
65
+ const isChatRoom = useMemo ( ( ) => ReportUtils . isChatRoom ( props . report ) , [ props . report ] ) ;
65
66
const isThread = useMemo ( ( ) => ReportUtils . isChatThread ( props . report ) , [ props . report ] ) ;
66
67
const isUserCreatedPolicyRoom = useMemo ( ( ) => ReportUtils . isUserCreatedPolicyRoom ( props . report ) , [ props . report ] ) ;
67
68
const isArchivedRoom = useMemo ( ( ) => ReportUtils . isArchivedRoom ( props . report ) , [ props . report ] ) ;
@@ -153,8 +154,8 @@ function ReportDetailsPage(props) {
153
154
fullTitle = { ReportUtils . getReportName ( props . report ) }
154
155
displayNamesWithTooltips = { displayNamesWithTooltips }
155
156
tooltipEnabled
156
- numberOfLines = { 1 }
157
- textStyles = { [ styles . textHeadline , styles . textAlignCenter , styles . pre ] }
157
+ numberOfLines = { isChatRoom ? 0 : 1 }
158
+ textStyles = { [ styles . textHeadline , styles . textAlignCenter , isChatRoom ? undefined : styles . pre ] }
158
159
shouldUseFullTitle = { shouldUseFullTitle }
159
160
/>
160
161
</ View >
You can’t perform that action at this time.
0 commit comments