fix(editor): refresh the icon preview on outside icon writes

A10: the editor's icon preview is painted by a closure nothing outside can
reach, so a favicon fetched from Settings (or an import overwrite) updated
the cards and left the open editor showing the old initials. soIconField
publishes its painter; saveEntryIcon — the choke point for every icon write
— routes through editorAbsorbChange like tag/folder already do.

Also whitelists .toast and #busyOverlay in the editor's click-outside: both
can sit under the cursor during a long operation, and clicking one counted
as clicking away.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-07-23 21:19:21 +01:00
parent 47c29bd04e
commit 04bc809c71
2 changed files with 16 additions and 0 deletions
+4
View File
@@ -52,7 +52,11 @@ async function saveEntryIcon(entryId, dataUri) {
try { const b = await r.json(); if (b && b.error) msg = b.error; }
catch (_) {}
toast('Icon NOT saved: ' + msg, 'error');
return;
}
// Choke point for every icon write (favicon backfill, upload, remove,
// import overwrite) — refresh the editor if it's open on this entry.
editorAbsorbChange(entryId, { icon: dataUri || '' });
} catch (e) {
toast('Icon save failed: ' + (e && e.message || e), 'error');
}