Add direct keybinds for presence states
This commit is contained in:
parent
3848ce60ca
commit
fec1026346
1
TODO.md
1
TODO.md
|
@ -1,6 +1,5 @@
|
|||
# TODO
|
||||
|
||||
- presence keybinds
|
||||
- retry if media not found
|
||||
- fix members not synced bug
|
||||
- fix local unread counters order
|
||||
|
|
|
@ -299,7 +299,11 @@ class UISettings(JSONDataFile):
|
|||
"toggleFocusMainPane": ["Alt+F"],
|
||||
"clearRoomFilter": ["Alt+Shift+F"],
|
||||
"toggleCollapseAccount": ["Alt+O"],
|
||||
"openPresenceMenu": ["Alt+P"],
|
||||
|
||||
"openPresenceMenu": ["Alt+P"],
|
||||
"togglePresenceUnavailable": ["Alt+Ctrl+U", "Alt+Ctrl+A"],
|
||||
"togglePresenceInvisible": ["Alt+Ctrl+I"],
|
||||
"togglePresenceOffline": ["Alt+Ctrl+O"],
|
||||
|
||||
"goToLastPage": ["Ctrl+Tab"],
|
||||
"goToPreviousAccount": ["Alt+Shift+N"],
|
||||
|
|
|
@ -199,6 +199,11 @@ HTile {
|
|||
setCollapse(! collapsed)
|
||||
}
|
||||
|
||||
function togglePresence(presence) {
|
||||
if (model.presence === presence) presence = "online"
|
||||
py.callClientCoro(model.id, "set_presence", [presence])
|
||||
}
|
||||
|
||||
|
||||
HShortcut {
|
||||
enabled: enableKeybinds
|
||||
|
@ -217,4 +222,22 @@ HTile {
|
|||
sequences: window.settings.keys.openPresenceMenu
|
||||
onActivated: account.doRightClick(false)
|
||||
}
|
||||
|
||||
HShortcut {
|
||||
enabled: enableKeybinds
|
||||
sequences: window.settings.keys.togglePresenceUnavailable
|
||||
onActivated: account.togglePresence("unavailable")
|
||||
}
|
||||
|
||||
HShortcut {
|
||||
enabled: enableKeybinds
|
||||
sequences: window.settings.keys.togglePresenceInvisible
|
||||
onActivated: account.togglePresence("invisible")
|
||||
}
|
||||
|
||||
HShortcut {
|
||||
enabled: enableKeybinds
|
||||
sequences: window.settings.keys.togglePresenceOffline
|
||||
onActivated: account.togglePresence("offline")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user