From 73cdbf64c78e05cfa478117fe8256141583b8edb Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Fri, 13 Feb 2026 14:12:56 +0500 Subject: [PATCH] mobile: fix note loading is slow in editor after login/signup --- apps/mobile/app/components/auth/common.ts | 2 +- apps/mobile/app/components/paywall/index.tsx | 8 ++++---- apps/mobile/app/screens/editor/tiptap/use-editor.ts | 7 ------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/apps/mobile/app/components/auth/common.ts b/apps/mobile/app/components/auth/common.ts index 0408691fb..b2c9ee2df 100644 --- a/apps/mobile/app/components/auth/common.ts +++ b/apps/mobile/app/components/auth/common.ts @@ -39,7 +39,7 @@ export function hideAuth(context?: AuthParams["context"]) { initialAuthMode.current === AuthMode.welcomeLogin || context === "intro" ) { - Navigation.replace("FluidPanelsView", {}); + Navigation.navigate("FluidPanelsView", {}); } else { Navigation.goBack(); } diff --git a/apps/mobile/app/components/paywall/index.tsx b/apps/mobile/app/components/paywall/index.tsx index c4bea39b2..ee228cb81 100644 --- a/apps/mobile/app/components/paywall/index.tsx +++ b/apps/mobile/app/components/paywall/index.tsx @@ -144,7 +144,7 @@ const PayWall = (props: NavigationProps<"PayWall">) => { (sub: User["subscription"]) => { if (sub.plan === SubscriptionPlan.FREE) return; if (routeParams.context === "signup") { - Navigation.replace("FluidPanelsView", {}); + Navigation.navigate("FluidPanelsView", {}); } else { Navigation.goBack(); } @@ -184,7 +184,7 @@ const PayWall = (props: NavigationProps<"PayWall">) => { name="close" color={colors.primary.icon} onPress={() => { - Navigation.replace("FluidPanelsView", {}); + Navigation.navigate("FluidPanelsView", {}); }} /> @@ -197,7 +197,7 @@ const PayWall = (props: NavigationProps<"PayWall">) => { return; } if (routeParams.context === "signup") { - Navigation.replace("FluidPanelsView", {}); + Navigation.navigate("FluidPanelsView", {}); } else { Navigation.goBack(); } @@ -655,7 +655,7 @@ After trying all the privacy security oriented note taking apps, for the price a type="accent" onPress={() => { if (routeParams.context === "signup") { - Navigation.replace("FluidPanelsView", {}); + Navigation.navigate("FluidPanelsView", {}); } else { Navigation.goBack(); } diff --git a/apps/mobile/app/screens/editor/tiptap/use-editor.ts b/apps/mobile/app/screens/editor/tiptap/use-editor.ts index aa351882a..58d69c46d 100644 --- a/apps/mobile/app/screens/editor/tiptap/use-editor.ts +++ b/apps/mobile/app/screens/editor/tiptap/use-editor.ts @@ -1034,13 +1034,6 @@ export const useEditor = ( state.current.isRestoringState = false; }, []); - useEffect(() => { - eSubscribeEvent(eOnLoadNote + editorId, loadNote); - return () => { - eUnSubscribeEvent(eOnLoadNote + editorId, loadNote); - }; - }, [editorId, loadNote, restoreEditorState, isDefaultEditor]); - const onContentChanged = (noteId?: string) => { if (noteId) { lastContentChangeTime.current[noteId] = Date.now();