Always use resolveResource instead of enterRoom or EnterSpaceHome

This commit is contained in:
James Graham
2024-01-24 20:26:21 +00:00
parent 35c68a6de1
commit bb566e3c7b
19 changed files with 69 additions and 170 deletions

View File

@@ -34,19 +34,21 @@ Delegates.RoundedItemDelegate {
signal selected()
Accessible.name: root.displayName
Accessible.onPressAction: selected()
Keys.onSpacePressed: selected()
Keys.onEnterPressed: selected()
Accessible.onPressAction: select()
onPressAndHold: createRoomListContextMenu()
Keys.onSpacePressed: select()
Keys.onEnterPressed: select()
Keys.onReturnPressed: select()
TapHandler {
acceptedButtons: Qt.RightButton | Qt.LeftButton
onTapped: (eventPoint, button) => {
if (button === Qt.RightButton) {
root.createRoomListContextMenu();
} else {
root.selected();
select()
}
}
}
@@ -145,6 +147,11 @@ Delegates.RoundedItemDelegate {
}
}
function select() {
RoomManager.resolveResource(currentRoom.id);
root.selected()
}
function createRoomListContextMenu() {
const component = Qt.createComponent("qrc:/org/kde/neochat/qml/ContextMenu.qml")
if (component.status === Component.Error) {