mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
make alphabetical sort order stable
This commit is contained in:
parent
989a27395e
commit
404e6f8b87
@ -45,8 +45,12 @@ export class RoomTileViewModel extends ViewModel {
|
||||
}
|
||||
|
||||
compare(other) {
|
||||
// sort by name for now
|
||||
return this._room.name.localeCompare(other._room.name);
|
||||
// sort alphabetically
|
||||
const nameCmp = this._room.name.localeCompare(other._room.name);
|
||||
if (nameCmp === 0) {
|
||||
return this._room.id.localeCompare(other._room.id);
|
||||
}
|
||||
return nameCmp;
|
||||
}
|
||||
|
||||
get isOpen() {
|
||||
|
Loading…
Reference in New Issue
Block a user