Add notification options to room context menu
This commit is contained in:
@@ -136,6 +136,9 @@ HTile {
|
||||
}
|
||||
|
||||
contextMenu: HMenu {
|
||||
// This delegate is only used for nested menus
|
||||
delegate: HMenuItem { icon.name: "room-menu-notifications" }
|
||||
|
||||
HMenuItem {
|
||||
icon.name: model.pinned ? "room-unpin": "room-pin"
|
||||
text: model.pinned ? qsTr("Unpin"): qsTr("Pin to top")
|
||||
@@ -144,6 +147,40 @@ HTile {
|
||||
)
|
||||
}
|
||||
|
||||
HMenu {
|
||||
title: qsTr("Notifications")
|
||||
|
||||
HMenuItem {
|
||||
text: qsTr("Use default account settings")
|
||||
onTriggered: py.callClientCoro(
|
||||
model.for_account, "room_pushrule_use_default", [model.id],
|
||||
)
|
||||
}
|
||||
|
||||
HMenuItem {
|
||||
text: qsTr("All new messages")
|
||||
onTriggered: py.callClientCoro(
|
||||
model.for_account, "room_pushrule_all_events", [model.id],
|
||||
)
|
||||
}
|
||||
|
||||
HMenuItem {
|
||||
text: qsTr("Highlights only (replies, keywords...)")
|
||||
onTriggered: py.callClientCoro(
|
||||
model.for_account,
|
||||
"room_pushrule_highlights_only",
|
||||
[model.id],
|
||||
)
|
||||
}
|
||||
|
||||
HMenuItem {
|
||||
text: qsTr("Ignore new messages")
|
||||
onTriggered: py.callClientCoro(
|
||||
model.for_account, "room_pushrule_ignore_all", [model.id],
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
HMenuItemPopupSpawner {
|
||||
visible: joined
|
||||
enabled: model.can_invite && accountModel.presence !== "offline"
|
||||
|
Reference in New Issue
Block a user