From 9750e25ad5b4c6dc74ff2edcc9d62fc2bfc493bc Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 26 Aug 2025 22:21:42 +0300 Subject: [PATCH] fix(mobile): note title not working --- .../src/layouts/{mobile_layout.ts => mobile_layout.tsx} | 4 ++-- apps/client/src/widgets/react/hooks.tsx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) rename apps/client/src/layouts/{mobile_layout.ts => mobile_layout.tsx} (96%) diff --git a/apps/client/src/layouts/mobile_layout.ts b/apps/client/src/layouts/mobile_layout.tsx similarity index 96% rename from apps/client/src/layouts/mobile_layout.ts rename to apps/client/src/layouts/mobile_layout.tsx index f21fcd3a3..77038a2dc 100644 --- a/apps/client/src/layouts/mobile_layout.ts +++ b/apps/client/src/layouts/mobile_layout.tsx @@ -143,7 +143,7 @@ export default class MobileLayout { .css("font-size", "larger") .css("align-items", "center") .child(new ToggleSidebarButtonWidget().contentSized()) - .child(NoteTitleWidget().contentSized().css("position", "relative").css("padding-left", "0.5em")) + .child() .child(new MobileDetailMenuWidget(true).contentSized()) ) .child(new SharedInfoWidget()) @@ -163,7 +163,7 @@ export default class MobileLayout { .contentSized() .child(new NoteDetailWidget()) .child(new NoteListWidget(false)) - .child(new FilePropertiesWidget().css("font-size", "smaller")) + //.child(new FilePropertiesWidget().css("font-size", "smaller")) ) .child(new MobileEditorToolbar()) ) diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsx index eeb13f7fc..c968e7498 100644 --- a/apps/client/src/widgets/react/hooks.tsx +++ b/apps/client/src/widgets/react/hooks.tsx @@ -209,7 +209,8 @@ export function useNoteContext() { useTriliumEvent("noteSwitchedAndActivated", ({ noteContext }) => { setNoteContext(noteContext); }); - useTriliumEvent("noteSwitched", ({ notePath }) => { + useTriliumEvent("noteSwitched", ({ notePath, noteContext }) => { + setNoteContext(noteContext); setNotePath(notePath); }); useTriliumEvent("frocaReloaded", () => {