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 ( return (
self.left, self.left,
other.inviter_id, other.inviter_id,
other.mentions,
other.unreads,
other.last_event_date, other.last_event_date,
(self.display_name or self.id).lower(), (self.display_name or self.id).lower(),
) < ( ) < (
other.left, other.left,
self.inviter_id, self.inviter_id,
self.mentions,
self.unreads,
self.last_event_date, self.last_event_date,
(other.display_name or other.id).lower(), (other.display_name or other.id).lower(),
) )