diff --git a/src/components/DisplayNames/index.js b/src/components/DisplayNames/index.js index 9f4dcc9459c2..c27b0ad63b25 100644 --- a/src/components/DisplayNames/index.js +++ b/src/components/DisplayNames/index.js @@ -78,11 +78,11 @@ class DisplayNames extends PureComponent { } return ( - // Tokenization of string only support 1 numberOfLines on Web + // Tokenization of string only support prop numberOfLines on Web (this.containerRef = el)} > {this.props.shouldUseFullTitle diff --git a/src/components/DisplayNames/index.native.js b/src/components/DisplayNames/index.native.js index 458c6b0acf9b..f1b1d7d0b7b5 100644 --- a/src/components/DisplayNames/index.native.js +++ b/src/components/DisplayNames/index.native.js @@ -8,7 +8,7 @@ function DisplayNames(props) { {props.fullTitle} diff --git a/src/pages/ReportDetailsPage.js b/src/pages/ReportDetailsPage.js index af54965b25ec..390418de5c75 100644 --- a/src/pages/ReportDetailsPage.js +++ b/src/pages/ReportDetailsPage.js @@ -62,6 +62,7 @@ function ReportDetailsPage(props) { const isPolicyAdmin = useMemo(() => PolicyUtils.isPolicyAdmin(policy), [policy]); const shouldDisableSettings = useMemo(() => ReportUtils.shouldDisableSettings(props.report), [props.report]); const shouldUseFullTitle = !shouldDisableSettings; + const isChatRoom = useMemo(() => ReportUtils.isChatRoom(props.report), [props.report]); const isThread = useMemo(() => ReportUtils.isChatThread(props.report), [props.report]); const isUserCreatedPolicyRoom = useMemo(() => ReportUtils.isUserCreatedPolicyRoom(props.report), [props.report]); const isArchivedRoom = useMemo(() => ReportUtils.isArchivedRoom(props.report), [props.report]); @@ -153,8 +154,8 @@ function ReportDetailsPage(props) { fullTitle={ReportUtils.getReportName(props.report)} displayNamesWithTooltips={displayNamesWithTooltips} tooltipEnabled - numberOfLines={1} - textStyles={[styles.textHeadline, styles.textAlignCenter, styles.pre]} + numberOfLines={isChatRoom ? 0 : 1} + textStyles={[styles.textHeadline, styles.textAlignCenter, isChatRoom ? undefined : styles.pre]} shouldUseFullTitle={shouldUseFullTitle} />