Merge pull request #5434 from vector-im/feature/nfe/space_unread_count_dm

include dms number in space unread number badge
This commit is contained in:
Benoit Marty 2022-03-09 11:16:07 +01:00 committed by GitHub
commit 02ba09900f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

1
changelog.d/5260.misc Normal file
View File

@ -0,0 +1 @@
Number of unread messages on space badge now include number of unread DMs

View File

@ -411,8 +411,6 @@ internal class RoomSummaryUpdater @Inject constructor(
realm.where(RoomSummaryEntity::class.java)
.process(RoomSummaryEntityFields.MEMBERSHIP_STR, listOf(Membership.JOIN))
.notEqualTo(RoomSummaryEntityFields.ROOM_TYPE, RoomType.SPACE)
// also we do not count DM in here, because home space will already show them
.equalTo(RoomSummaryEntityFields.IS_DIRECT, false)
.contains(RoomSummaryEntityFields.FLATTEN_PARENT_IDS, space.roomId)
.findAll().forEach {
highlightCount += it.highlightCount