From 9b2d16d86a7c7f639911a72f4c21d07b855e5b2c Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Thu, 25 Apr 2024 22:35:33 -0400 Subject: [PATCH 1/2] Don't call GetNewerActions when not comment linking --- src/pages/home/report/ReportActionsView.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionsView.tsx b/src/pages/home/report/ReportActionsView.tsx index 26f796b8bdc4..e58e0fa3312e 100755 --- a/src/pages/home/report/ReportActionsView.tsx +++ b/src/pages/home/report/ReportActionsView.tsx @@ -348,10 +348,17 @@ function ReportActionsView({ newestReportAction: newestReportAction.pendingAction, firstReportActionID: newestReportAction?.reportActionID, isLoadingOlderReportsFirstNeeded, + reportActionID, })}`, ); - if (isLoadingInitialReportActions || isLoadingOlderReportActions || network.isOffline || newestReportAction.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) { + if ( + !reportActionID || + isLoadingInitialReportActions || + isLoadingOlderReportActions || + network.isOffline || + newestReportAction.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE + ) { return; } From 43915b336be07772d1f835c5865f56769d2a0d5d Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Sat, 27 Apr 2024 15:43:38 -0400 Subject: [PATCH 2/2] Add isFocused check --- src/pages/home/report/ReportActionsView.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/home/report/ReportActionsView.tsx b/src/pages/home/report/ReportActionsView.tsx index e58e0fa3312e..cb904327e625 100755 --- a/src/pages/home/report/ReportActionsView.tsx +++ b/src/pages/home/report/ReportActionsView.tsx @@ -354,6 +354,7 @@ function ReportActionsView({ if ( !reportActionID || + !isFocused || isLoadingInitialReportActions || isLoadingOlderReportActions || network.isOffline || @@ -375,6 +376,7 @@ function ReportActionsView({ network.isOffline, reportActions.length, newestReportAction, + isFocused, ]); /**