diff options
| author | Adam Soltys <[email protected]> | 2026-08-15 17:19:28 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-15 17:19:28 -0700 |
| commit | 18786c7774e817b6a55c27017c8f719c2197afcb (patch) | |
| tree | a3e40cc0264bff7493b3d55f4584cd08690f891d /src/features | |
| parent | b269935af4d3b2fdc71b5f52340b25b9cb7d8da8 (diff) | |
| download | coinosv3-18786c7774e817b6a55c27017c8f719c2197afcb.tar.gz coinosv3-18786c7774e817b6a55c27017c8f719c2197afcb.zip | |
A newborn identity knows it has no portrait: fresh seeds skip the kind-0 wait and the punk paints the moment home appears
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014tE4U5nEjGTQy8PwYqamfv
Diffstat (limited to 'src/features')
| -rw-r--r-- | src/features/messages.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/features/messages.js b/src/features/messages.js index 890fbb5..08ec8cf 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -2158,6 +2158,17 @@ export function messagesFeature(ctx) { // the picture visibly flash during boot's render bursts. There is exactly // one header avatar, so the node itself is reused until the profile // (or account) actually changes. + // A seed minted seconds ago has no kind-0 anywhere — don't make the + // avatar sit white while a relay lookup confirms that; paint the punk now. + identityGenerated() { + identity().then((id) => { + if (!id) return; + const entry = { name: null, picture: null, t: Date.now() }; + profiles.set(id.pubkey, entry); + persistProfile(id.pubkey, entry); + scheduleRepaint(); + }).catch(() => {}); + }, headerAvatar(pk) { // A fresh node every render: the morph keeps the live element (and its // loaded image) in place when nothing changed, which is exactly what |
