mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
fix(app): separate unread state from unread counts
This commit is contained in:
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(
|
||||
|
||||
Reference in new issue
Block a user