Refactor global shortcuts, simplify debug consoles
- Move out all shortcuts from their central file to the component they actually belong to - Get rid of DebugConsoleLoader and the multiple consoles handling mess, have only one global console
This commit is contained in:
@@ -6,6 +6,7 @@ import QtQuick.Window 2.12
|
||||
import Clipboard 0.1
|
||||
import "../../.."
|
||||
import "../../../Base"
|
||||
import "../../../ShortcutBundles"
|
||||
|
||||
Rectangle {
|
||||
color: theme.chat.eventList.background
|
||||
@@ -56,6 +57,23 @@ Rectangle {
|
||||
eventList.currentItem.eventContent.debugConsoleLoader.toggle()
|
||||
}
|
||||
|
||||
HShortcut {
|
||||
sequences: window.settings.keys.clearRoomMessages
|
||||
onActivated: utils.makePopup(
|
||||
"Popups/ClearMessagesPopup.qml",
|
||||
mainUI,
|
||||
{
|
||||
userId: window.uiState.pageProperties.userId,
|
||||
roomId: window.uiState.pageProperties.roomId,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
FlickShortcuts {
|
||||
flickable: eventList
|
||||
}
|
||||
|
||||
|
||||
HListView {
|
||||
id: eventList
|
||||
clip: true
|
||||
@@ -109,8 +127,6 @@ Rectangle {
|
||||
// fetch past events.
|
||||
onInviterChanged: canLoad = true
|
||||
|
||||
Component.onCompleted: shortcuts.flickTarget = eventList
|
||||
|
||||
|
||||
property string inviter: chat.roomInfo.inviter || ""
|
||||
property real yPos: visibleArea.yPosition
|
||||
|
Reference in New Issue
Block a user