Skip to content

Commit

Permalink
Use isPolicyRoom
Browse files Browse the repository at this point in the history
  • Loading branch information
mountiny committed Dec 13, 2021
1 parent 4d74742 commit 9bbd555
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ function getChatReportName(fullReport, chatType) {
: '')}`;
}

// For a basic policy room, return its originally name
if (chatType === CONST.REPORT.CHAT_TYPE.POLICY_ROOM) {
// For a basic policy room, return its original name
if (ReportUtils.isPolicyRoom({chatType})) {
return fullReport.reportName;
}

Expand Down
4 changes: 2 additions & 2 deletions src/pages/home/HeaderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ const HeaderView = (props) => {
};
},
);
const isDefaultChatRoom = ReportUtils.isDefaultRoom(props.report);
const isPolicyRoom = ReportUtils.isPolicyRoom(props.report);
const isDefaultChatRoom = ReportUtils.isDefaultRoom(props.report);
const title = isDefaultChatRoom || isPolicyRoom
? props.report.reportName
: _.map(displayNamesWithTooltips, ({displayName}) => displayName).join(', ');
Expand Down Expand Up @@ -146,7 +146,7 @@ const HeaderView = (props) => {
tooltipEnabled
numberOfLines={1}
textStyles={[styles.headerText]}
shouldUseFullTitle={isDefaultChatRoom}
shouldUseFullTitle={isDefaultChatRoom || isPolicyRoom}
/>
{isDefaultChatRoom && (
<ExpensifyText
Expand Down

0 comments on commit 9bbd555

Please sign in to comment.