From 2fa9458eabba12a835a2a395566199dbee51bcd9 Mon Sep 17 00:00:00 2001 From: Yuri Karamian Date: Fri, 12 Jun 2026 17:57:48 +0200 Subject: [PATCH] Trash: empty/restore/delete now reflects immediately instead of needing an app restart (don't serve the volatile trash view from cache) --- src/lib/components/NoteList.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/components/NoteList.svelte b/src/lib/components/NoteList.svelte index e564647..d85faa5 100644 --- a/src/lib/components/NoteList.svelte +++ b/src/lib/components/NoteList.svelte @@ -310,7 +310,9 @@ } const key = cacheKey(); - const cached = noteCache.get(key); + // Never serve the trash view from cache: emptying / restoring / deleting changes it, + // and a stale cache left it showing cleared items until an app restart. Always re-read. + const cached = $viewMode === 'trash' ? undefined : noteCache.get(key); if (cached) { $notes = cached; return;