Sort muted rooms to the bottom of their section of the room list (#10592)
* muted-to-the-bottom POC * split muted rooms in natural algorithm * add previous event to account data dispatch * add muted to notification state * sort muted rooms to the bottom * only split muted rooms when sorting is RECENT * remove debugs * use RoomNotifState better * add default notifications test util * test getChangedOverrideRoomPushRules * remove file * test roomudpate in roomliststore * unit test ImportanceAlgorithm * strict fixes * test recent x importance with muted rooms * unit test NaturalAlgorithm * test naturalalgorithm with muted rooms * strict fixes * comments * add push rules test utility * strict fixes * more strict * tidy comment * document previousevent on account data dispatch event * simplify (?) room mute rule utilities, comments * remove debug
This commit is contained in:
parent
3ca957b541
commit
44e0732144
15 changed files with 765 additions and 27 deletions
|
@ -93,9 +93,12 @@ export class RoomNotificationState extends NotificationState implements IDestroy
|
|||
const snapshot = this.snapshot();
|
||||
|
||||
const { color, symbol, count } = RoomNotifs.determineUnreadState(this.room);
|
||||
const muted =
|
||||
RoomNotifs.getRoomNotifsState(this.room.client, this.room.roomId) === RoomNotifs.RoomNotifState.Mute;
|
||||
this._color = color;
|
||||
this._symbol = symbol;
|
||||
this._count = count;
|
||||
this._muted = muted;
|
||||
|
||||
// finally, publish an update if needed
|
||||
this.emitIfUpdated(snapshot);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue