Adds thread notifications and highlights to RoomSummaryEntity
This commit is contained in:
parent
00bfbe9bc6
commit
ebd8461724
|
@ -115,6 +115,16 @@ internal open class RoomSummaryEntity(
|
|||
if (value != field) field = value
|
||||
}
|
||||
|
||||
var threadNotificationCount: Int = 0
|
||||
set(value) {
|
||||
if (value != field) field = value
|
||||
}
|
||||
|
||||
var threadHighlightCount: Int = 0
|
||||
set(value) {
|
||||
if (value != field) field = value
|
||||
}
|
||||
|
||||
var readMarkerId: String? = null
|
||||
set(value) {
|
||||
if (value != field) field = value
|
||||
|
|
|
@ -113,7 +113,15 @@ internal class RoomSummaryUpdater @Inject constructor(
|
|||
roomSummaryEntity.highlightCount = unreadNotifications?.highlightCount ?: 0
|
||||
roomSummaryEntity.notificationCount = unreadNotifications?.notificationCount ?: 0
|
||||
|
||||
// TODO: Handle unreadThreadNotifications
|
||||
roomSummaryEntity.threadHighlightCount = unreadThreadNotifications
|
||||
?.mapNotNull { it.value.highlightCount }
|
||||
?.sum()
|
||||
?: 0
|
||||
roomSummaryEntity.threadNotificationCount = unreadThreadNotifications
|
||||
?.mapNotNull { it.value.notificationCount }
|
||||
?.sum()
|
||||
?: 0
|
||||
|
||||
|
||||
if (membership != null) {
|
||||
roomSummaryEntity.membership = membership
|
||||
|
|
Loading…
Reference in New Issue