diff --git a/apps/mobile/app/components/auth/common.js b/apps/mobile/app/components/auth/common.js index 88e62ff3d..255d4f96a 100644 --- a/apps/mobile/app/components/auth/common.js +++ b/apps/mobile/app/components/auth/common.js @@ -38,9 +38,6 @@ export function hideAuth(context) { context === "intro" ) { Navigation.replace("FluidPanelsView"); - setTimeout(() => { - Navigation.resetRootState(); - }, 1000); } else { Navigation.goBack(); } diff --git a/apps/mobile/app/navigation/navigation-stack.tsx b/apps/mobile/app/navigation/navigation-stack.tsx index f566ccc0f..52726e214 100644 --- a/apps/mobile/app/navigation/navigation-stack.tsx +++ b/apps/mobile/app/navigation/navigation-stack.tsx @@ -258,12 +258,14 @@ export const RootNavigation = () => { (state) => state.settings.introCompleted ); const clearSelection = useSelectionStore((state) => state.clearSelection); + const resetTimer = React.useRef(undefined); const onStateChange = React.useCallback( (state: any) => { if (useSelectionStore.getState().selectionMode) { clearSelection(); } - setTimeout(() => { + clearTimeout(resetTimer.current); + resetTimer.current = setTimeout(() => { Navigation.resetRootState(state); }, 1000); hideAllTooltips();