mobile: remove AddReminder from stack on navigation away to prevent stale form state

Signed-off-by: kashaf-ansari-dev <kashafansari3108@gmail.com>
This commit is contained in:
kashaf-ansari-dev
2026-07-31 09:49:36 +05:00
parent e4fa0e9f0b
commit 57113e0896
2 changed files with 5 additions and 3 deletions

View File

@@ -288,7 +288,7 @@ export default function AddReminder(props: NavigationProps<"AddReminder">) {
Notifications.scheduleNotification(_reminder as Reminder);
Navigation.queueRoutesForUpdate();
useRelationStore.getState().update();
Navigation.goBack();
handleBackNavigation();
} catch (e) {
ToastManager.error(e as Error, undefined);
}

View File

@@ -177,9 +177,11 @@ function resetRootState(
if (state.routes.length < 2) return;
const routes = state.routes.filter(
let routes = state.routes.filter(
(route) =>
(route.name !== "Auth" && route.name !== "Welcome") ||
(route.name !== "Auth" &&
route.name !== "Welcome" &&
route.name !== "AddReminder") ||
route.key === focusedRoute.key
);