aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-28 09:03:15 -0700
committerAdam Soltys <[email protected]>2026-08-28 09:03:15 -0700
commit45bcaf8a514250cfc3a540b9b6ed10d3cdbf20ff (patch)
treedba707dca4236a7dd6ae518257b4d12dfe1e3c34 /src/features
parent5525d237afc477401a36a9b639a03a73c49c5529 (diff)
downloadcoinosv3-45bcaf8a514250cfc3a540b9b6ed10d3cdbf20ff.tar.gz
coinosv3-45bcaf8a514250cfc3a540b9b6ed10d3cdbf20ff.zip
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
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019eA8JRq9Wr7z2fRQk99HLi
Diffstat (limited to 'src/features')
-rw-r--r--src/features/messages.js11
1 files changed, 10 insertions, 1 deletions
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