Collapse-expand account → correct highlighted room
This commit is contained in:
parent
a1b485c039
commit
14ffe0ba0b
|
@ -33,6 +33,9 @@ HListView {
|
||||||
onLeftClicked: pageLoader.showPage(
|
onLeftClicked: pageLoader.showPage(
|
||||||
"AccountSettings/AccountSettings", {userId: model.id}
|
"AccountSettings/AccountSettings", {userId: model.id}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
onCollapsedChanged: { print(wantedUserId, model.id);
|
||||||
|
if (wantedUserId === model.id) correctTimer.start()}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +72,7 @@ HListView {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
currentIndex = -1 // will trigger the correctTimer
|
correctTimer.start()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,8 +200,7 @@ HListView {
|
||||||
Connections {
|
Connections {
|
||||||
target: pageLoader
|
target: pageLoader
|
||||||
onPreviousShown:
|
onPreviousShown:
|
||||||
// Will trigger the timer above if item isn't found
|
if (setCorrectCurrentItem() === false) correctTimer.start()
|
||||||
if (setCorrectCurrentItem() === false) currentIndex = -1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
|
@ -210,6 +212,7 @@ HListView {
|
||||||
repeat: true
|
repeat: true
|
||||||
triggeredOnStart: true
|
triggeredOnStart: true
|
||||||
onTriggered: setCorrectCurrentItem()
|
onTriggered: setCorrectCurrentItem()
|
||||||
|
onRunningChanged: if (running && currentIndex !== -1) currentIndex = -1
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user