Skip to content

Commit

Permalink
Merge pull request #34860 from hungvu193/fix-34270
Browse files Browse the repository at this point in the history
fix: Open offline notes from deeplink
  • Loading branch information
stitesExpensify authored Jan 26, 2024
2 parents 62f4383 + de3606f commit 86275ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/home/report/withReportAndPrivateNotesOrNotFound.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default function (pageTitle) {
const prevIsOffline = usePrevious(network.isOffline);
const isReconnecting = prevIsOffline && !network.isOffline;
const isOtherUserNote = accountID && Number(session.accountID) !== Number(accountID);
const isPrivateNotesFetchFinished = isPrivateNotesFetchTriggered && !report.isLoadingPrivateNotes;
const isPrivateNotesEmpty = accountID ? _.has(lodashGet(report, ['privateNotes', accountID, 'note'], '')) : _.isEmpty(report.privateNotes);

useEffect(() => {
Expand All @@ -76,7 +77,7 @@ export default function (pageTitle) {
// eslint-disable-next-line react-hooks/exhaustive-deps -- do not add report.isLoadingPrivateNotes to dependencies
}, [report.reportID, network.isOffline, isPrivateNotesFetchTriggered, isReconnecting]);

const shouldShowFullScreenLoadingIndicator = !isPrivateNotesFetchTriggered || (isPrivateNotesEmpty && (report.isLoadingPrivateNotes || !isOtherUserNote));
const shouldShowFullScreenLoadingIndicator = !isPrivateNotesFetchFinished || (isPrivateNotesEmpty && (report.isLoadingPrivateNotes || !isOtherUserNote));

// eslint-disable-next-line rulesdir/no-negated-variables
const shouldShowNotFoundPage = useMemo(() => {
Expand Down

0 comments on commit 86275ae

Please sign in to comment.