Skip to content

Commit

Permalink
Merge pull request #36637 from HezekielT/fix--35927---Display-the-hom…
Browse files Browse the repository at this point in the history
…e-route-when-the-app-restarts-on-mobile-platforms

Fix - display the home route when the app restarts on mobile platforms
  • Loading branch information
Hayata Suenaga authored Feb 16, 2024
2 parents bffdfda + 0b778c0 commit c70f2d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/setup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as Device from '@userActions/Device';
import exposeGlobalMemoryOnlyKeysMethods from '@userActions/MemoryOnlyKeys/exposeGlobalMemoryOnlyKeysMethods';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import initializeLastVisitedPath from './initializeLastVisitedPath';
import platformSetup from './platformSetup';

export default function () {
Expand Down Expand Up @@ -40,6 +41,8 @@ export default function () {
isVisible: false,
willAlertModalBecomeVisible: false,
},
// Always open the home route on app startup for native platforms by clearing the lastVisitedPath
[ONYXKEYS.LAST_VISITED_PATH]: initializeLastVisitedPath(),
},
});

Expand Down
3 changes: 3 additions & 0 deletions src/setup/initializeLastVisitedPath/index.native.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function (): string {
return '';
}
1 change: 1 addition & 0 deletions src/setup/initializeLastVisitedPath/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function (): undefined {}

0 comments on commit c70f2d9

Please sign in to comment.