Add clear messages shortcut

This commit is contained in:
miruka
2019-09-08 11:49:47 -04:00
parent db0de237e6
commit e93c251624
5 changed files with 22 additions and 4 deletions

View File

@@ -177,7 +177,7 @@ Rectangle {
}
HNoticePage {
text: qsTr("No messages to show yet")
text: qsTr("No messages to show yet.")
visible: eventList.model.count < 1
anchors.fill: parent

View File

@@ -109,4 +109,17 @@ HShortcutHandler {
sequences: settings.keys.toggleCollapseAccount
onPressed: mainUI.sidePane.sidePaneList.toggleCollapseAccount()
}
// Chat
HShortcut {
enabled: window.uiState.page == "Chat/Chat.qml"
sequences: settings.keys.clearRoomMessages
onPressed: py.callClientCoro(
window.uiState.pageProperties.userId,
"clear_events",
[window.uiState.pageProperties.roomId],
)
}
}