fix(app): separate unread state from unread counts

This commit is contained in:
Hampus authored and GitHub committed 2026-08-27 02:35:56 +02:00
1 parent d3976e33f8
commit cb4c847d41
16 files changed
+175 -23

No files matched your search

@@ -61,10 +61,7 @@ function getChannelRecency(channel: {id: string; lastMessageId: string | null}):
}
function getChannelSortWeight(channelId: string, baseWeight: number): number {
const unreadCount = ReadStates.getUnreadCount(channelId);
const mentionCount = ReadStates.getMentionCount(channelId);
const hasUnread = unreadCount > 0 || mentionCount > 0;
return hasUnread ? baseWeight + UNREAD_SORT_WEIGHT_BOOST : baseWeight;
return ReadStates.isUnreadOrMentioned(channelId) ? baseWeight + UNREAD_SORT_WEIGHT_BOOST : baseWeight;
}
export function buildChannelCandidate(