From 372c647e197921a1469826c0dede2b646858708f Mon Sep 17 00:00:00 2001 From: mkzie2 Date: Fri, 11 Oct 2024 16:17:06 +0700 Subject: [PATCH 1/2] fix: report RHP turns to central pane after editing category and sending a message --- src/pages/home/report/ReportActionsList.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionsList.tsx b/src/pages/home/report/ReportActionsList.tsx index ce925d4375af..96b19439f8c2 100644 --- a/src/pages/home/report/ReportActionsList.tsx +++ b/src/pages/home/report/ReportActionsList.tsx @@ -159,7 +159,7 @@ function ReportActionsList({ const styles = useThemeStyles(); const {translate} = useLocalize(); const {windowHeight} = useWindowDimensions(); - const {shouldUseNarrowLayout} = useResponsiveLayout(); + const {isInNarrowPaneModal, shouldUseNarrowLayout} = useResponsiveLayout(); const {isOffline} = useNetwork(); const route = useRoute>(); @@ -346,6 +346,9 @@ function ReportActionsList({ return; } if (!hasNewestReportActionRef.current) { + if (isInNarrowPaneModal) { + return; + } Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(report.reportID)); return; } From 67d9f71eb173a000bf856ad74297024ed95289e4 Mon Sep 17 00:00:00 2001 From: mkzie2 Date: Fri, 11 Oct 2024 16:20:48 +0700 Subject: [PATCH 2/2] fix lint --- src/pages/home/report/ReportActionsList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionsList.tsx b/src/pages/home/report/ReportActionsList.tsx index 96b19439f8c2..76ba6426929b 100644 --- a/src/pages/home/report/ReportActionsList.tsx +++ b/src/pages/home/report/ReportActionsList.tsx @@ -354,7 +354,7 @@ function ReportActionsList({ } InteractionManager.runAfterInteractions(() => reportScrollManager.scrollToBottom()); }, - [reportScrollManager, report.reportID], + [isInNarrowPaneModal, reportScrollManager, report.reportID], ); useEffect(() => { // Why are we doing this, when in the cleanup of the useEffect we are already calling the unsubscribe function?