Fix timer setting current AccountsRoomList index

This commit is contained in:
miruka 2019-08-23 10:53:54 -04:00
parent 2ff65af6ab
commit 9077ea3925
4 changed files with 8 additions and 1 deletions

View File

@ -17,6 +17,7 @@ HButton {
readonly property alias additionalInfo: additionalInfo
readonly property alias rightInfo: rightInfo
readonly property alias subtitle: subtitle
readonly property alias setCurrentTimer: setCurrentTimer
property HMenu contextMenu: HMenu {}
@ -77,9 +78,10 @@ HButton {
Timer {
id: setCurrentTimer
interval: 100
repeat: true
// running: true
running: true
// Component.onCompleted won't work for this
onTriggered: if (shouldBeCurrent) view.currentIndex = model.index
}

View File

@ -10,6 +10,7 @@ HListView {
readonly property var originSource: window.sidePaneModelSource
readonly property var collapseAccounts: window.uiState.collapseAccounts
readonly property string filter: paneToolBar.roomFilter
readonly property alias activateLimiter: activateLimiter
onOriginSourceChanged: filterLimiter.restart()
onFilterChanged: filterLimiter.restart()

View File

@ -15,6 +15,8 @@ HTileDelegate {
window.uiState.page == "Pages/EditAccount/EditAccount.qml" &&
window.uiState.pageProperties.userId == model.data.user_id
setCurrentTimer.running: ! accountRoomList.activateLimiter.running
Behavior on opacity { HNumberAnimation {} }

View File

@ -14,6 +14,8 @@ HTileDelegate {
window.uiState.pageProperties.userId == model.user_id &&
window.uiState.pageProperties.roomId == model.data.room_id
setCurrentTimer.running: ! accountRoomList.activateLimiter.running
Behavior on opacity { HNumberAnimation {} }