Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
chiragsalian committed Jun 21, 2023
1 parent f2f010c commit 325935c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,7 @@ function getReportName(report) {

/**
* Recursively navigates through thread parents to get the root report and workspace name.
* The recursion stops when we find a non thread or money request report, whichever comes first.
* @param {Object} report
* @returns {Object}
*/
Expand Down Expand Up @@ -1100,7 +1101,7 @@ function getChatRoomSubtitle(report) {
}

/**
* Get the subtitleLink for the report
* Get the subtitle link for the report
* @param {Object} report
* @returns {String}
*/
Expand Down
8 changes: 4 additions & 4 deletions src/pages/home/HeaderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ function HeaderView(props) {
const participantPersonalDetails = OptionsListUtils.getPersonalDetailsForAccountIDs(participants, props.personalDetails);
const isMultipleParticipant = participants.length > 1;
const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips(participantPersonalDetails, isMultipleParticipant);
const isThread = ReportUtils.isChatThread(props.report);
const isChatThread = ReportUtils.isChatThread(props.report);
const isChatRoom = ReportUtils.isChatRoom(props.report);
const isPolicyExpenseChat = ReportUtils.isPolicyExpenseChat(props.report);
const isTaskReport = ReportUtils.isTaskReport(props.report);
const reportHeaderData = !isTaskReport && !isThread && props.report.parentReportID ? props.parentReport : props.report;
const reportHeaderData = !isTaskReport && !isChatThread && props.report.parentReportID ? props.parentReport : props.report;
const title = ReportUtils.getReportName(reportHeaderData);
const subtitle = ReportUtils.getChatRoomSubtitle(reportHeaderData);
const subtitleLink = ReportUtils.getChatRoomSubtitleLink(reportHeaderData);
Expand Down Expand Up @@ -175,7 +175,7 @@ function HeaderView(props) {
) : (
<MultipleAvatars
icons={icons}
shouldShowTooltip={!isChatRoom || isThread}
shouldShowTooltip={!isChatRoom || isChatThread}
/>
)}
<View style={[styles.flex1, styles.flexColumn]}>
Expand All @@ -185,7 +185,7 @@ function HeaderView(props) {
tooltipEnabled
numberOfLines={1}
textStyles={[styles.headerText, styles.pre]}
shouldUseFullTitle={isChatRoom || isPolicyExpenseChat || isThread || isTaskReport}
shouldUseFullTitle={isChatRoom || isPolicyExpenseChat || isChatThread || isTaskReport}
/>
{!_.isEmpty(subtitleLink) && (
<PressableWithoutFeedback
Expand Down

0 comments on commit 325935c

Please sign in to comment.