Skip to content

Commit 0044529

Browse files
authored
Merge pull request Expensify#70391 from bernhardoj/fix/70070-parent-navigation-subtitle-shows-chat-report
Fix expense report parent navigation subtitle shows Chat report
2 parents 34685c3 + e01119b commit 0044529

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/components/AvatarWithDisplayName.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ function AvatarWithDisplayName({
177177
const isParentReportArchived = useReportIsArchived(report?.parentReportID);
178178
const isReportArchived = useReportIsArchived(report?.reportID);
179179
const subtitle = getChatRoomSubtitle(report, true, isReportArchived);
180-
const parentNavigationSubtitleData = getParentNavigationSubtitle(report, isParentReportArchived);
180+
const parentNavigationSubtitleData = getParentNavigationSubtitle(report, isParentReportArchived, reportAttributes);
181181
const isMoneyRequestOrReport = isMoneyRequestReport(report) || isMoneyRequest(report) || isTrackExpenseReport(report) || isInvoiceReport(report);
182182
const ownerPersonalDetails = getPersonalDetailsForAccountIDs(report?.ownerAccountID ? [report.ownerAccountID] : [], personalDetails);
183183
const displayNamesWithTooltips = getDisplayNamesWithTooltips(Object.values(ownerPersonalDetails), false, localeCompare);

src/libs/ReportUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5565,7 +5565,7 @@ function getPendingChatMembers(accountIDs: number[], previousPendingChatMembers:
55655565
/**
55665566
* Gets the parent navigation subtitle for the report
55675567
*/
5568-
function getParentNavigationSubtitle(report: OnyxEntry<Report>, isParentReportArchived = false): ParentNavigationSummaryParams {
5568+
function getParentNavigationSubtitle(report: OnyxEntry<Report>, isParentReportArchived = false, reportAttributes?: ReportAttributesDerivedValue['reports']): ParentNavigationSummaryParams {
55695569
const parentReport = getParentReport(report);
55705570
if (isEmptyObject(parentReport)) {
55715571
const ownerAccountID = report?.ownerAccountID;
@@ -5599,7 +5599,7 @@ function getParentNavigationSubtitle(report: OnyxEntry<Report>, isParentReportAr
55995599
}
56005600

56015601
return {
5602-
reportName: getReportName(parentReport),
5602+
reportName: getReportName(parentReport, undefined, undefined, undefined, undefined, reportAttributes),
56035603
workspaceName: getPolicyName({report: parentReport, returnEmptyIfNotFound: true}),
56045604
};
56055605
}

0 commit comments

Comments
 (0)