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:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user