Skip to content

Commit 7509052

Browse files
committed
fix app stuck on splash screen on hybrid app
1 parent 186c601 commit 7509052

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/Expensify.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ function Expensify() {
214214
Linking.addEventListener('url', (state) => {
215215
// We use custom deeplink handler in setup/hybridApp
216216
if (CONFIG.IS_HYBRID_APP) {
217+
Report.doneCheckingPublicRoom();
217218
return;
218219
}
219220
Report.openReportFromDeepLink(state.url);

src/libs/actions/Report.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3359,6 +3359,10 @@ function toggleEmojiReaction(
33593359
addEmojiReaction(originalReportID, reportAction.reportActionID, emoji, skinTone);
33603360
}
33613361

3362+
function doneCheckingPublicRoom() {
3363+
Onyx.set(ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, false);
3364+
}
3365+
33623366
function openReportFromDeepLink(url: string) {
33633367
const reportID = getReportIDFromLink(url);
33643368
const isAuthenticated = hasAuthToken();
@@ -3369,11 +3373,11 @@ function openReportFromDeepLink(url: string) {
33693373

33703374
// Show the sign-in page if the app is offline
33713375
if (networkStatus === CONST.NETWORK.NETWORK_STATUS.OFFLINE) {
3372-
Onyx.set(ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, false);
3376+
doneCheckingPublicRoom();
33733377
}
33743378
} else {
33753379
// If we're not opening a public room (no reportID) or the user is authenticated, we unblock the UI (hide splash screen)
3376-
Onyx.set(ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, false);
3380+
doneCheckingPublicRoom();
33773381
}
33783382

33793383
let route = getRouteFromLink(url);
@@ -5777,6 +5781,7 @@ export {
57775781
deleteReportComment,
57785782
deleteReportField,
57795783
dismissTrackExpenseActionableWhisper,
5784+
doneCheckingPublicRoom,
57805785
downloadReportPDF,
57815786
editReportComment,
57825787
expandURLPreview,

0 commit comments

Comments
 (0)