Sort rooms with mentions, then unreads first

This commit is contained in:
miruka 2020-04-16 13:59:31 -04:00
parent c787ff6f41
commit f3aa9f0c5f

View File

@ -96,11 +96,15 @@ class Room(ModelItem):
return (
self.left,
other.inviter_id,
other.mentions,
other.unreads,
other.last_event_date,
(self.display_name or self.id).lower(),
) < (
other.left,
self.inviter_id,
self.mentions,
self.unreads,
self.last_event_date,
(other.display_name or other.id).lower(),
)