From 45bcaf8a514250cfc3a540b9b6ed10d3cdbf20ff Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 28 Aug 2026 09:03:15 -0700 Subject: The red dot stops being fashionably late: a device with no read watermarks paints it from the first frame — the community is never empty and read state is local, so the fetch was only ever going to confirm it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_019eA8JRq9Wr7z2fRQk99HLi --- src/features/messages.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/features/messages.js b/src/features/messages.js index 3c03ce0..e49a7b9 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -2406,7 +2406,16 @@ export function messagesFeature(ctx) { return avatar(pk, 'chat-avatar header-ava', false); }, // Conversations waiting on us, for the header's message button. - unreadMessages() { return unreadCount(); }, + unreadMessages() { + // A device with no read watermarks yet (a fresh restore or brand-new + // wallet) will show the dot the moment the community messages land — + // which is always: the default community is never empty and read state + // is device-local. Paint it from the first frame instead of popping it + // in when the fetch returns. + const s = st(); + if (!Object.keys(s.read || {}).length && !threads.size && !rooms.size) return 1; + return unreadCount(); + }, notifySettingsCards() { return [notifyCard()]; }, screenView() { // A profile deep link mid-resolution holds the frame over EVERY screen -- cgit v1.2.3