Fix opening the last room active room if it's not in a space

At the moment, the saved room was effectively always overridden by the first room in the list
This commit is contained in:
Tobias Fella
2024-03-29 00:06:26 +01:00
parent 30dd6297ee
commit 6ab61fd41f

View File

@@ -32,7 +32,7 @@ Kirigami.Page {
readonly property RoomTreeModel roomTreeModel: RoomTreeModel {
connection: root.connection
}
property bool spaceChanging: true
property bool spaceChanging: false
readonly property bool collapsed: Config.collapsed
@@ -128,12 +128,11 @@ Kirigami.Page {
reuseItems: false
onLayoutChanged: {
treeView.expandRecursively();
if (sortFilterRoomTreeModel.filterTextJustChanged) {
treeView.expandRecursively();
sortFilterRoomTreeModel.filterTextJustChanged = false;
}
if (root.spaceChanging) {
treeView.expandRecursively();
if (spaceDrawer.showDirectChats || spaceDrawer.selectedSpaceId.length < 1) {
const item = treeView.itemAtIndex(treeView.index(1, 0))
if (!item) {