From 4886f1c3b9e6d800069a590a7391ea92f436fd30 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Mon, 28 Aug 2023 00:51:34 +0200 Subject: [PATCH] Deselect space when leaving it BUG: 473271 (cherry picked from commit cc60dde62d020d2faac941c41c080e42bf570eda) --- src/qml/Page/RoomList/SpaceDrawer.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/qml/Page/RoomList/SpaceDrawer.qml b/src/qml/Page/RoomList/SpaceDrawer.qml index a21681e3b..aa701ca37 100644 --- a/src/qml/Page/RoomList/SpaceDrawer.qml +++ b/src/qml/Page/RoomList/SpaceDrawer.qml @@ -72,7 +72,12 @@ QQC2.Control { connection: Controller.activeConnection } } - onCountChanged: root.enabled = count > 0 + onCountChanged: { + root.enabled = count > 0 + if (!Controller.activeConnection.room(root.selectedSpaceId)) { + root.selectedSpaceId = "" + } + } Component.onCompleted: root.enabled = count > 0 delegate: AvatarTabButton {