From f2f640640335f5cd6eb8243e496c9fd978c83f14 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Sun, 15 Sep 2024 20:59:12 +0000 Subject: [PATCH] Don't open a room by default on mobile Since the room window is fullscreen on mobile and you can't see the room list, the first thing you'll be doing is backing out so you can choose the actual room you want to see (cherry picked from commit 17da652152578a3138d3ddb2b834dbff7e6c8d43) Co-authored-by: Bart Ribbers --- src/roommanager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/roommanager.cpp b/src/roommanager.cpp index 8bbd690cd..9471a6a27 100644 --- a/src/roommanager.cpp +++ b/src/roommanager.cpp @@ -16,6 +16,7 @@ #include "urlhelper.h" #include +#include #include #include #include @@ -239,6 +240,12 @@ void RoomManager::loadInitialRoom() resolveResource(m_arg); } + const auto runtimePlatform = KRuntimePlatform::runtimePlatform(); + if (runtimePlatform.contains(QStringLiteral("phone")) || runtimePlatform.contains(QStringLiteral("handset"))) { + // We don't want to open a room on startup on mobile + return; + } + if (m_currentRoom) { // we opened a room with the arg parsing already return;