Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(mobile/nav): hoisting doesn't work
Elian Doran41f5a32fdc93
diff --git a/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.tsx b/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.tsxindex 60760bc1a9..b5cf86f6bd 100644--- a/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.tsx+++ b/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.tsx@@ -44,6 +44,12 @@ export default function MobileNoteNavigator() {const [nextStack, setNextStack] = useState<string[] | null>(null);const manualStackRef = useRef(false);+ // Hoisting always reframes the navigator around the hoisted note, so drop+ // any manual drill position when it changes.+ useEffect(() => {+ manualStackRef.current = false;+ }, [effectiveHoistedId]);+// Sync stack with the active note path unless the user has manually drilled.useEffect(() => {if (manualStackRef.current) return;