Navigate to room with maximum notifications when clicked on already selected space
This commit is contained in:
parent
2bf931b9d3
commit
73b9ad41da
2 changed files with 18 additions and 2 deletions
|
@ -53,6 +53,11 @@ export class SpaceNotificationState extends NotificationState {
|
|||
this.calculateTotalState();
|
||||
}
|
||||
|
||||
public getRoomWithMaxNotifications() {
|
||||
return this.rooms.reduce((prev, curr) =>
|
||||
(prev._notificationCounts.total > curr._notificationCounts.total ? prev : curr)).roomId;
|
||||
}
|
||||
|
||||
public destroy() {
|
||||
super.destroy();
|
||||
for (const state of Object.values(this.states)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue