Remove inboxCollection, ensure falsey active_at removes from badge count

This commit is contained in:
Scott Nonnenberg 2022-05-31 18:26:57 -07:00 committed by GitHub
parent 4a8cdbd687
commit 638e3e3a58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 172 additions and 95 deletions

View file

@ -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;
}