diff --git a/src/Expensify.tsx b/src/Expensify.tsx index 587e529ec8a4..be677ecc0f48 100644 --- a/src/Expensify.tsx +++ b/src/Expensify.tsx @@ -93,7 +93,7 @@ function Expensify() { const [session] = useOnyx(ONYXKEYS.SESSION, {canBeMissing: true}); const [lastRoute] = useOnyx(ONYXKEYS.LAST_ROUTE, {canBeMissing: true}); const [userMetadata] = useOnyx(ONYXKEYS.USER_METADATA, {canBeMissing: true}); - const [isCheckingPublicRoom] = useOnyx(ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, {initWithStoredValues: false, canBeMissing: true}); + const [isCheckingPublicRoom = true] = useOnyx(ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, {initWithStoredValues: false, canBeMissing: true}); const [updateAvailable] = useOnyx(ONYXKEYS.UPDATE_AVAILABLE, {initWithStoredValues: false, canBeMissing: true}); const [updateRequired] = useOnyx(ONYXKEYS.UPDATE_REQUIRED, {initWithStoredValues: false, canBeMissing: true}); const [isSidebarLoaded] = useOnyx(ONYXKEYS.IS_SIDEBAR_LOADED, {canBeMissing: true}); @@ -204,6 +204,7 @@ function Expensify() { Linking.getInitialURL().then((url) => { // We use custom deeplink handler in setup/hybridApp if (CONFIG.IS_HYBRID_APP) { + Report.doneCheckingPublicRoom(); return; } setInitialUrl(url); diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 91f5655ef8f2..0a4dddb1ed45 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -3359,6 +3359,10 @@ function toggleEmojiReaction( addEmojiReaction(originalReportID, reportAction.reportActionID, emoji, skinTone); } +function doneCheckingPublicRoom() { + Onyx.set(ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, false); +} + function openReportFromDeepLink(url: string) { const reportID = getReportIDFromLink(url); const isAuthenticated = hasAuthToken(); @@ -3369,11 +3373,11 @@ function openReportFromDeepLink(url: string) { // Show the sign-in page if the app is offline if (networkStatus === CONST.NETWORK.NETWORK_STATUS.OFFLINE) { - Onyx.set(ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, false); + doneCheckingPublicRoom(); } } else { // If we're not opening a public room (no reportID) or the user is authenticated, we unblock the UI (hide splash screen) - Onyx.set(ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, false); + doneCheckingPublicRoom(); } let route = getRouteFromLink(url); @@ -5777,6 +5781,7 @@ export { deleteReportComment, deleteReportField, dismissTrackExpenseActionableWhisper, + doneCheckingPublicRoom, downloadReportPDF, editReportComment, expandURLPreview,