Skip to content

Commit d3b7376

Browse files
authored
Merge pull request #55141 from jaydamani/lhn/fix-for-reopened-reports--54578
fix(lhn): don't show closed this report in lhn for reopned reports
2 parents 6fa5579 + 8f8e9d4 commit d3b7376

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libs/OptionsListUtils.ts

+4
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,10 @@ function getLastMessageTextForReport(report: OnyxEntry<Report>, lastActorDetails
611611
lastMessageTextFromReport = ReportActionUtils.getMessageOfOldDotReportAction(lastReportAction, false);
612612
}
613613

614+
// we do not want to show report closed in LHN for non archived report so use getReportLastMessage as fallback instead of lastMessageText from report
615+
if (reportID && !report.private_isArchived && report.lastActionType === CONST.REPORT.ACTIONS.TYPE.CLOSED) {
616+
return lastMessageTextFromReport || (ReportUtils.getReportLastMessage(reportID).lastMessageText ?? '');
617+
}
614618
return lastMessageTextFromReport || (report?.lastMessageText ?? '');
615619
}
616620

0 commit comments

Comments
 (0)