Sort invites on top
This commit is contained in:
parent
2cd4ab11ce
commit
2b393ff193
|
@ -1076,7 +1076,9 @@ class Client {
|
|||
/// The compare function how the rooms should be sorted internally. By default
|
||||
/// rooms are sorted by timestamp of the last m.room.message event or the last
|
||||
/// event if there is no known message.
|
||||
RoomSorter sortRoomsBy = (a, b) => (a.isFavourite != b.isFavourite)
|
||||
RoomSorter sortRoomsBy = (a, b) => (a.membership != b.membership)
|
||||
? (a.membership == Membership.invite ? -1 : 1)
|
||||
: (a.isFavourite != b.isFavourite)
|
||||
? (a.isFavourite ? -1 : 1)
|
||||
: b.timeCreated.millisecondsSinceEpoch
|
||||
.compareTo(a.timeCreated.millisecondsSinceEpoch);
|
||||
|
|
Loading…
Reference in a new issue