mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +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) {
|
compare(other) {
|
||||||
// sort by name for now
|
// sort alphabetically
|
||||||
return this._room.name.localeCompare(other._room.name);
|
const nameCmp = this._room.name.localeCompare(other._room.name);
|
||||||
|
if (nameCmp === 0) {
|
||||||
|
return this._room.id.localeCompare(other._room.id);
|
||||||
|
}
|
||||||
|
return nameCmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
get isOpen() {
|
get isOpen() {
|
||||||
|
Loading…
Reference in New Issue
Block a user