Remove inboxCollection, ensure falsey active_at removes from badge count
This commit is contained in:
parent
4a8cdbd687
commit
638e3e3a58
5 changed files with 172 additions and 95 deletions
|
@ -8,13 +8,21 @@ export function getConversationUnreadCountForAppBadge(
|
|||
conversation: Readonly<
|
||||
Pick<
|
||||
ConversationAttributesType,
|
||||
'isArchived' | 'markedUnread' | 'muteExpiresAt' | 'unreadCount'
|
||||
| 'active_at'
|
||||
| 'isArchived'
|
||||
| 'markedUnread'
|
||||
| 'muteExpiresAt'
|
||||
| 'unreadCount'
|
||||
>
|
||||
>,
|
||||
canCountMutedConversations: boolean
|
||||
): number {
|
||||
const { isArchived, markedUnread, unreadCount } = conversation;
|
||||
|
||||
if (!conversation.active_at) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (isArchived) {
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue