From 2b9b956dadbbc28dae434aa478a5300dc1dc316b Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Tue, 16 Jun 2026 18:42:20 -0400 Subject: [PATCH] fix(notes): sync pinned note state in sidebar and editor menu (#25918) --- src/lib/components/notes/NoteEditor.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/components/notes/NoteEditor.svelte b/src/lib/components/notes/NoteEditor.svelte index 4216243857..3401a8d6f2 100644 --- a/src/lib/components/notes/NoteEditor.svelte +++ b/src/lib/components/notes/NoteEditor.svelte @@ -219,6 +219,10 @@ }).catch((e) => { toast.error(`${e}`); }); + + if (res) { + pinnedNotes.set(await getPinnedNoteList(localStorage.token).catch(() => [])); + } }, 200); }; @@ -1092,7 +1096,7 @@ Provide the enhanced notes in markdown format. Use markdown syntax for headings, onDelete={() => { showDeleteConfirm = true; }} - isPinned={note.is_pinned ?? false} + isPinned={$pinnedNotes.some((n) => n.id === note.id)} onPin={async () => { await toggleNotePinnedStatusById(localStorage.token, note.id); note = await getNoteById(localStorage.token, note.id);