Do not count DOE stories in the unread count

This commit is contained in:
Josh Perez 2022-08-05 13:17:14 -04:00 committed by GitHub
parent f735a9cfa7
commit 71382b8f65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -364,7 +364,10 @@ export const getUnreadStorySenderCount = createSelector(
({ stories }): number => {
return new Set(
stories
.filter(story => story.readStatus === ReadStatus.Unread)
.filter(
story =>
story.readStatus === ReadStatus.Unread && !story.deletedForEveryone
)
.map(story => story.conversationId)
).size;
}
@ -388,7 +391,8 @@ export const getHasStoriesSelector = createSelector(
}
return conversationStories.some(
story => story.readStatus === ReadStatus.Unread
story =>
story.readStatus === ReadStatus.Unread && !story.deletedForEveryone
)
? HasStories.Unread
: HasStories.Read;