mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-08-29 10:09:26 +02:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user