A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
mobile: fix crash during navigation
Ammar Ahmed565e692af874
diff --git a/apps/mobile/app/navigation/navigation-stack.tsx b/apps/mobile/app/navigation/navigation-stack.tsxindex 556e503ac..af5dbe96c 100644--- a/apps/mobile/app/navigation/navigation-stack.tsx+++ b/apps/mobile/app/navigation/navigation-stack.tsx@@ -261,8 +261,9 @@ export const RootNavigation = () => {if (useSelectionStore.getState().selectionMode) {clearSelection();}- console.log(state);- Navigation.resetRootState(state);+ setTimeout(() => {+ Navigation.resetRootState(state);+ }, 1000);hideAllTooltips();},[clearSelection]diff --git a/apps/mobile/app/services/navigation.ts b/apps/mobile/app/services/navigation.tsindex 1da81e3b3..1ed737d07 100755--- a/apps/mobile/app/services/navigation.ts+++ b/apps/mobile/app/services/navigation.ts@@ -176,13 +176,11 @@ function resetRootState(const routes = state.routes.filter((route) =>- route.name !== "Auth" &&- route.name !== "Welcome" &&- route.key != focusedRoute.key+ (route.name !== "Auth" && route.name !== "Welcome") ||+ route.key === focusedRoute.key);if (routes.length === state.routes.length) return;- console.log("ROOT STATE RESET");if (routes.length === 0) {routes.push(focusedRoute);}