Merge pull request #5031 from matrix-org/travis/room-list/a-z-order
Ensure incremental updates to the ImportanceAlgorithm trigger A-Z order
This commit is contained in:
commit
ba73ce16e6
1 changed files with 1 additions and 0 deletions
|
@ -123,6 +123,7 @@ export class ImportanceAlgorithm extends OrderingAlgorithm {
|
||||||
const category = this.getRoomCategory(room);
|
const category = this.getRoomCategory(room);
|
||||||
this.alterCategoryPositionBy(category, 1, this.indices);
|
this.alterCategoryPositionBy(category, 1, this.indices);
|
||||||
this.cachedOrderedRooms.splice(this.indices[category], 0, room); // splice in the new room (pre-adjusted)
|
this.cachedOrderedRooms.splice(this.indices[category], 0, room); // splice in the new room (pre-adjusted)
|
||||||
|
await this.sortCategory(category);
|
||||||
} else if (cause === RoomUpdateCause.RoomRemoved) {
|
} else if (cause === RoomUpdateCause.RoomRemoved) {
|
||||||
const roomIdx = this.getRoomIndex(room);
|
const roomIdx = this.getRoomIndex(room);
|
||||||
if (roomIdx === -1) {
|
if (roomIdx === -1) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue