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

@@ -23,11 +23,7 @@ RowLayout {
onTriggered: {
let dialog = pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/ExploreRoomsPage.qml", {connection: root.connection}, {title: i18nc("@title", "Explore Rooms")})
dialog.roomSelected.connect((roomId, displayName, avatarUrl, alias, topic, memberCount, isJoined) => {
if (isJoined) {
RoomManager.enterRoom(root.connection.room(roomId))
} else {
RoomManager.resolveResource(roomId.length > 0 ? roomId : alias, "join")
}
RoomManager.resolveResource(roomId.length > 0 ? roomId : alias, isJoined ? "" : "join")
})
}
}