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