Skip to content

Commit

Permalink
no need to fetch new actions in linked message and offline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
narefyev91 committed May 22, 2024
1 parent 61a5653 commit f86f0e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/home/report/ReportActionsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ function ReportActionsView({
*/
const fetchNewerAction = useCallback(
(newestReportAction: OnyxTypes.ReportAction) => {
if (isLoadingNewerReportActions || isLoadingInitialReportActions) {
if (isLoadingNewerReportActions || isLoadingInitialReportActions || (!!reportActionID && isOffline)) {
return;
}

Expand All @@ -226,7 +226,7 @@ function ReportActionsView({
Report.getNewerActions(reportID, newestReportAction.reportActionID);
}
},
[isLoadingNewerReportActions, isLoadingInitialReportActions, reportID, transactionThreadReport, reportActionIDMap],
[isLoadingNewerReportActions, isLoadingInitialReportActions, reportActionID, isOffline, transactionThreadReport, reportActionIDMap, reportID],
);

const hasMoreCached = reportActions.length < combinedReportActions.length;
Expand Down

0 comments on commit f86f0e6

Please sign in to comment.