diff --git a/src/pages/inbox/ReportScreen.tsx b/src/pages/inbox/ReportScreen.tsx index 0b2df4f01a018..f0e822d674e03 100644 --- a/src/pages/inbox/ReportScreen.tsx +++ b/src/pages/inbox/ReportScreen.tsx @@ -373,13 +373,23 @@ function ReportScreen({route, navigation, isInSidePanel = false}: ReportScreenPr reportMetadata?.isLoadingInitialReportActions || reportMetadata?.isOptimisticReport || isLoadingApp || - userLeavingStatus + userLeavingStatus || + !reportWasDeleted ) { return; } Navigation.goBack(); - }, [isFocused, reportIDFromRoute, report?.reportID, reportMetadata?.isLoadingInitialReportActions, reportMetadata?.isOptimisticReport, isLoadingApp, userLeavingStatus]); + }, [ + isFocused, + reportIDFromRoute, + report?.reportID, + reportMetadata?.isLoadingInitialReportActions, + reportMetadata?.isOptimisticReport, + isLoadingApp, + userLeavingStatus, + reportWasDeleted, + ]); useEffect(() => { if (!prevIsFocused || isFocused) {