Skip to content

Commit

Permalink
Merge pull request #41053 from janicduplessis/@janic/fix-get-newer-ac…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
francoisl authored Apr 29, 2024
2 parents 7ca0dba + 43915b3 commit 81ff7b4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/pages/home/report/ReportActionsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,18 @@ 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 ||
!isFocused ||
isLoadingInitialReportActions ||
isLoadingOlderReportActions ||
network.isOffline ||
newestReportAction.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE
) {
return;
}

Expand All @@ -368,6 +376,7 @@ function ReportActionsView({
network.isOffline,
reportActions.length,
newestReportAction,
isFocused,
]);

/**
Expand Down

0 comments on commit 81ff7b4

Please sign in to comment.