diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index d3195193c74..3ccdeba5228 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -6839,6 +6839,7 @@ export { isDM, isDefaultRoom, isDeprecatedGroupDM, + isEmptyReport, isRootGroupChat, isExpenseReport, isExpenseRequest, diff --git a/src/pages/home/ReportScreen.tsx b/src/pages/home/ReportScreen.tsx index 29b58971b5c..6167a3a8809 100644 --- a/src/pages/home/ReportScreen.tsx +++ b/src/pages/home/ReportScreen.tsx @@ -292,7 +292,7 @@ function ReportScreen({ const {reportPendingAction, reportErrors} = ReportUtils.getReportOfflinePendingActionAndErrors(report); const screenWrapperStyle: ViewStyle[] = [styles.appContent, styles.flex1, {marginTop: viewportOffsetTop}]; - const isEmptyChat = useMemo((): boolean => reportActions.length === 0, [reportActions]); + const isEmptyChat = useMemo(() => ReportUtils.isEmptyReport(report), [report]); const isOptimisticDelete = report.statusNum === CONST.REPORT.STATUS_NUM.CLOSED; const isLinkedMessageAvailable = useMemo( (): boolean => sortedAllReportActions.findIndex((obj) => String(obj.reportActionID) === String(reportActionIDFromRoute)) > -1,