From 21cd9ced2fd5d7aba60805912fee77bfe750825d Mon Sep 17 00:00:00 2001 From: drelich Date: Tue, 31 Mar 2026 10:06:02 +0200 Subject: [PATCH] Add favorite notes sorting to display starred notes at top - Favorited/starred notes now appear at the top of the notes list - Within each group (favorites/non-favorites), notes are sorted by modified date (newest first) - Matches mobile app behavior --- src/App.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index d11e7cb..a48b7e5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -315,6 +315,12 @@ function App() { note.content.toLowerCase().includes(search); } return true; + }).sort((a, b) => { + // Sort favorites first, then by modified date (newest first) + if (a.favorite !== b.favorite) { + return a.favorite ? -1 : 1; + } + return b.modified - a.modified; }); const selectedNote = notes.find(n => n.id === selectedNoteId) || null;