Change room bookmark terminology to pin/unpin

Pin/unpin is more representative of what the function actually does
for rooms in the left pane. Also change the corresponding icons and
renames the config file section: RoomList.Bookmarks → RoomList.Pinned
This commit is contained in:
miruka
2021-02-25 05:51:48 -04:00
parent 13558fd61c
commit 8a6f7c262f
6 changed files with 39 additions and 32 deletions

View File

@@ -171,7 +171,7 @@ class Room(ModelItem):
local_unreads: bool = False
lexical_sorting: bool = False
bookmarked: bool = False
pinned: bool = False
def __lt__(self, other: "Room") -> bool:
"""Sort by membership, highlights/unread events, last event date, name.
@@ -186,14 +186,14 @@ class Room(ModelItem):
if self.lexical_sorting:
return (
self.for_account,
other.bookmarked,
other.pinned,
self.left,
bool(other.inviter_id),
(self.display_name or self.id).lower(),
self.id,
) < (
other.for_account,
self.bookmarked,
self.pinned,
other.left,
bool(self.inviter_id),
(other.display_name or other.id).lower(),
@@ -203,7 +203,7 @@ class Room(ModelItem):
# Left rooms may still have an inviter_id, so check left first.
return (
self.for_account,
other.bookmarked,
other.pinned,
self.left,
bool(other.inviter_id),
bool(other.highlights),
@@ -215,7 +215,7 @@ class Room(ModelItem):
) < (
other.for_account,
self.bookmarked,
self.pinned,
other.left,
bool(self.inviter_id),
bool(self.highlights),
@@ -238,7 +238,7 @@ class AccountOrRoom(Account, Room):
self.account_order,
self.id if self.type is Account else self.for_account,
other.type is Account,
other.bookmarked,
other.pinned,
self.left,
bool(other.inviter_id),
(self.display_name or self.id).lower(),
@@ -247,7 +247,7 @@ class AccountOrRoom(Account, Room):
other.account_order,
other.id if other.type is Account else other.for_account,
self.type is Account,
self.bookmarked,
self.pinned,
other.left,
bool(self.inviter_id),
(other.display_name or other.id).lower(),
@@ -258,7 +258,7 @@ class AccountOrRoom(Account, Room):
self.account_order,
self.id if self.type is Account else self.for_account,
other.type is Account,
other.bookmarked,
other.pinned,
self.left,
bool(other.inviter_id),
bool(other.highlights),
@@ -272,7 +272,7 @@ class AccountOrRoom(Account, Room):
other.account_order,
other.id if other.type is Account else other.for_account,
self.type is Account,
self.bookmarked,
self.pinned,
other.left,
bool(self.inviter_id),
bool(self.highlights),