From c19fd63f1687c8fdfd38a8446e7cf936342ba4ef Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 4 Aug 2026 01:50:24 -0700 Subject: Avatars stop flashing everywhere: backgrounds, not MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A recreated decodes async — one blank frame per render, and boot renders in bursts. A CSS background paints synchronously from cache, so the profile page, chat rows, and send candidates all hold steady now. Co-Authored-By: Claude Fable 5 --- src/recipient-search.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/recipient-search.js') diff --git a/src/recipient-search.js b/src/recipient-search.js index b8a17ea..2cf52b6 100644 --- a/src/recipient-search.js +++ b/src/recipient-search.js @@ -161,7 +161,9 @@ export function resultRows(h, rows, onPick) { return rows.map((r) => h('div', { class: 'item chat-thread-row', onClick: () => onPick(r) }, r.picture - ? h('img', { class: 'chat-avatar', src: r.picture, alt: '' }) + // background, not : paints synchronously from cache, so rows + // re-rendered per keystroke don't flash their avatars + ? h('div', { class: 'chat-avatar ava-img', style: `background-image:url(${JSON.stringify(r.picture)})` }) : fallbackAvatar(h, r.pk, r.name, 'chat-avatar'), h('div', { class: 'col grow', style: 'min-width:0;gap:1px' }, h('div', { class: 'chat-name' }, r.name || (npubOf(r.pk) || '').slice(0, 12)), -- cgit v1.2.3