Fix space switching on mobile

We forgot to connect to onTapped on the touchscreen-specific TapHandler.
I also needed to carve out a specific case for DMs so it doesn't try to
resolve the non-existent "DM" resource.
This commit is contained in:
Joshua Goins
2025-05-25 19:08:46 -04:00
parent bf1dc00338
commit 5c8ba7e29e
2 changed files with 4 additions and 1 deletions

View File

@@ -48,6 +48,7 @@ Delegates.RoundedItemDelegate {
TapHandler {
acceptedDevices: PointerDevice.TouchScreen
onTapped: root.selected()
onLongPressed: root.contextMenuRequested()
}

View File

@@ -540,7 +540,9 @@ void RoomManager::setCurrentSpace(const QString &spaceId, bool setRoom)
const auto &lastRoom = m_lastRoomConfig.readEntry(configSpaceId, QString());
if (lastRoom.isEmpty()) {
resolveResource(spaceId, "no_join"_L1);
if (spaceId != u"DM"_s) {
resolveResource(spaceId, "no_join"_L1);
}
} else {
resolveResource(lastRoom, "no_join"_L1);
}