Add shortcut to add new chats
This commit is contained in:
@@ -54,7 +54,6 @@ HBox {
|
||||
|
||||
|
||||
HRoomAvatar {
|
||||
// TODO: click to change the avatar
|
||||
id: avatar
|
||||
clientUserId: userId
|
||||
displayName: nameField.text
|
||||
|
@@ -104,6 +104,12 @@ HShortcutHandler {
|
||||
onPressed: mainUI.sidePane.toolBar.addAccountButton.clicked()
|
||||
}
|
||||
|
||||
HShortcut {
|
||||
enabled: mainUI.accountsPresent
|
||||
sequences: settings.keys.addNewChat
|
||||
onPressed: mainUI.sidePane.sidePaneList.addNewChat()
|
||||
}
|
||||
|
||||
HShortcut {
|
||||
enabled: mainUI.accountsPresent
|
||||
sequences: settings.keys.goToPreviousRoom
|
||||
|
@@ -72,6 +72,15 @@ HListView {
|
||||
currentItem.item.activated()
|
||||
}
|
||||
|
||||
function addNewChat() {
|
||||
if (! currentItem) incrementCurrentIndex()
|
||||
|
||||
pageLoader.showPage(
|
||||
"AddChat/AddChat",
|
||||
{userId: currentItem.item.delegateModel.user_id},
|
||||
)
|
||||
}
|
||||
|
||||
function toggleCollapseAccount() {
|
||||
if (! currentItem || filter) return
|
||||
|
||||
|
Reference in New Issue
Block a user