Skip to content

fix(chat): count unread groups in the Chats tab badge - #1557

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/chat-tab-badge-groups
Sep 24, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
fix/chat-tab-badge-groups

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

The Chats list shows tip DMs and groups, but the tab badge counted unread tip DMs only. When the only unread chats were groups, their rows showed a count and the tab had no badge.

  • ChatsViewModel read feed(TIP_DM, GROUP); RealSessionController read observeUnreadConversations(TIP_DM).
  • Both now go through chatListFeed() / currentChatListFeed() / observeUnreadChatListCount() in :shared:chat (ChatList.kt), which hold the one list of types. MuteChatViewModel used the same pair and moves over too.
  • SessionState.tipsUnreadCount → chatListUnreadCount, and NavigationBarState.tipUnreadCount to match. The Chats tab badge was their only reader, so nothing else starts counting groups.
  • ChatListUnreadCountTest runs the real FeedSyncDelegate: an unread group counts toward the badge, an unread contact DM doesn't.

Same fix as iOS in code-payments/code-ios-app#860, where chatListConversations drives both the list and unreadChatListCount.

The Chats list shows tip DMs and groups, but the tab badge counted
unread tip DMs only. When the only unread chats were groups, their rows
showed a count and the tab showed no badge.

Both now read through one definition in :shared:chat (chatListFeed,
currentChatListFeed, observeUnreadChatListCount), so the badge counts
the same chats as the list. SessionState.tipsUnreadCount is renamed to
chatListUnreadCount, and the nav bar's tipUnreadCount to match; the
Chats tab badge is their only reader.
@bmc08gt bmc08gt self-assigned this Sep 24, 2026
@bmc08gt
bmc08gt merged commit 553fe1d into code/cash Sep 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant