From 61c2919c7fd4f8fadc555e71a1f2e0869d11156e Mon Sep 17 00:00:00 2001 From: miruka Date: Sat, 30 Nov 2019 03:59:44 -0400 Subject: [PATCH] Sort members and undated rooms case-insensitively --- src/python/models/items.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/python/models/items.py b/src/python/models/items.py index 8f4d8a66..e4ac064f 100644 --- a/src/python/models/items.py +++ b/src/python/models/items.py @@ -63,7 +63,7 @@ class Room(ModelItem): other.last_event["date"] if other.last_event else datetime.fromtimestamp(0), - self.display_name or self.room_id, + self.display_name.lower() or self.room_id, ) < ( other.left, @@ -72,7 +72,7 @@ class Room(ModelItem): self.last_event["date"] if self.last_event else datetime.fromtimestamp(0), - other.display_name or other.room_id, + other.display_name.lower() or other.room_id, ) @property @@ -96,7 +96,7 @@ class Member(ModelItem): def __lt__(self, other: "Member") -> bool: name = self.display_name or self.user_id[1:] other_name = other.display_name or other.user_id[1:] - return name < other_name + return name.lower() < other_name.lower() @property