Remove unreadRoomId from summarized notification state
This commit is contained in:
parent
746b11b24d
commit
1b21c8f732
4 changed files with 28 additions and 16 deletions
|
@ -54,7 +54,7 @@ export class SpaceNotificationState extends NotificationState {
|
|||
}
|
||||
|
||||
public getFirstRoomWithNotifications() {
|
||||
return this.rooms.find((room) => room._notificationCounts.total > 0).roomId;
|
||||
return this.rooms.find((room) => room.getUnreadNotificationCount() > 0).roomId;
|
||||
}
|
||||
|
||||
public destroy() {
|
||||
|
|
|
@ -32,7 +32,6 @@ export class SummarizedNotificationState extends NotificationState {
|
|||
super();
|
||||
this._symbol = null;
|
||||
this._count = 0;
|
||||
this.unreadRoomId = null;
|
||||
this._color = NotificationColor.None;
|
||||
}
|
||||
|
||||
|
@ -40,10 +39,6 @@ export class SummarizedNotificationState extends NotificationState {
|
|||
return this.totalStatesWithUnread;
|
||||
}
|
||||
|
||||
public getFirstRoomWithNotifications() {
|
||||
return this.unreadRoomId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append a notification state to this snapshot, taking the loudest NotificationColor
|
||||
* of the two. By default this will not adopt the symbol of the other notification
|
||||
|
@ -63,7 +58,6 @@ export class SummarizedNotificationState extends NotificationState {
|
|||
this._color = other.color;
|
||||
}
|
||||
if (other.hasUnreadCount) {
|
||||
this.unreadRoomId = !this.unreadRoomId ? other.room.roomId : this.unreadRoomId;
|
||||
this.totalStatesWithUnread++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue