Add room bookmarking: bookmarks are always on top
Introduce a bookmark system for rooms: a room bookmarked will always appear on top of every other (for a given account). Bookmarking can be done through context menu on targeted room (as well as un-bookmarking) or through settings.json (key roomBookmarkIDs) for permanent bookmark. roomBookmarkIds is a {account_user_id: [room_id]} dict.
This commit is contained in:
@@ -63,7 +63,9 @@ HTile {
|
||||
spacing: room.spacing
|
||||
|
||||
TitleLabel {
|
||||
text: model.display_name || qsTr("Empty room")
|
||||
text:
|
||||
(model.bookmarked ? "\u2665 " : "") +
|
||||
(model.display_name || qsTr("Empty room"))
|
||||
color:
|
||||
model.local_unreads ?
|
||||
theme.mainPane.listView.room.unreadName :
|
||||
@@ -150,6 +152,14 @@ HTile {
|
||||
})
|
||||
}
|
||||
|
||||
HMenuItem {
|
||||
icon.name: model.bookmarked ? "bookmark-remove": "bookmark-add"
|
||||
text: model.bookmarked ? qsTr("Remove bookmark"): qsTr("Bookmark")
|
||||
onTriggered: py.callClientCoro(
|
||||
model.for_account, "toggle_bookmark", [model.id]
|
||||
)
|
||||
}
|
||||
|
||||
HMenuItem {
|
||||
icon.name: "copy-room-id"
|
||||
text: qsTr("Copy room ID")
|
||||
|
Reference in New Issue
Block a user