Skip to content

Commit

Permalink
Merge pull request #44184 from Expensify/arosiclair-clear-not-found-e…
Browse files Browse the repository at this point in the history
…rrors

Remove clearReportNotFoundErrors
  • Loading branch information
lakchote authored Jul 1, 2024
2 parents 86f19f4 + c0f44a8 commit d489ba4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
13 changes: 0 additions & 13 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2255,18 +2255,6 @@ function clearPolicyRoomNameErrors(reportID: string) {
});
}

/**
* @param reportID The reportID of the report.
*/
// eslint-disable-next-line rulesdir/no-negated-variables
function clearReportNotFoundErrors(reportID: string) {
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, {
errorFields: {
notFound: null,
},
});
}

function setIsComposerFullSize(reportID: string, isComposerFullSize: boolean) {
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_IS_COMPOSER_FULL_SIZE}${reportID}`, isComposerFullSize);
}
Expand Down Expand Up @@ -3781,7 +3769,6 @@ export {
toggleSubscribeToChildReport,
updatePolicyRoomNameAndNavigate,
clearPolicyRoomNameErrors,
clearReportNotFoundErrors,
clearIOUError,
subscribeToNewActionEvent,
notifyNewAction,
Expand Down
10 changes: 0 additions & 10 deletions src/pages/home/ReportScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -439,16 +439,6 @@ function ReportScreen({
Report.openReport(reportIDFromRoute, reportActionIDFromRoute);
}, [reportIDFromRoute, reportActionIDFromRoute]);

useEffect(() => {
if (!report.reportID) {
return;
}

if (report?.errorFields?.notFound) {
Report.clearReportNotFoundErrors(report.reportID);
}
}, [report?.errorFields?.notFound, report.reportID]);

useEffect(() => {
if (!report.reportID || !isFocused) {
return;
Expand Down

0 comments on commit d489ba4

Please sign in to comment.