fix(@desktop/onboarding): when recovering user sometimes needs to wait for the end of the countdown even if all backup data are fetched
Fixes: #13058
This commit is contained in:
parent
50c187edff
commit
e4958adb0e
|
@ -16,6 +16,8 @@ QtObject:
|
|||
allTotalsSet: bool
|
||||
lastKnownBackedUpMsgClock: uint64
|
||||
|
||||
proc reevaluateAllTotals(self: Model)
|
||||
|
||||
proc delete(self: Model) =
|
||||
self.items = @[]
|
||||
self.QAbstractListModel.delete
|
||||
|
@ -92,6 +94,7 @@ QtObject:
|
|||
if(ind == -1):
|
||||
return
|
||||
self.items[ind].receivedMessageAtPosition(position)
|
||||
self.reevaluateAllTotals()
|
||||
let index = self.createIndex(ind, 0, nil)
|
||||
defer: index.delete
|
||||
self.dataChanged(index, index, @[ModelRole.LoadedMessages.int])
|
||||
|
|
|
@ -27,7 +27,7 @@ Item {
|
|||
}
|
||||
|
||||
onStateChanged: {
|
||||
if (root.startupStore.currentStartupState.stateType === Constants.startupState.profileFetching) {
|
||||
if (root.state === Constants.startupState.profileFetching) {
|
||||
d.counter = Constants.onboarding.profileFetching.timeout
|
||||
}
|
||||
}
|
||||
|
@ -147,12 +147,12 @@ Item {
|
|||
id: button
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
focus: true
|
||||
enabled: root.startupStore.currentStartupState.stateType !== Constants.startupState.profileFetching
|
||||
enabled: root.state !== Constants.startupState.profileFetching
|
||||
|
||||
Timer {
|
||||
id: timer
|
||||
interval: 1000
|
||||
running: root.startupStore.currentStartupState.stateType === Constants.startupState.profileFetching
|
||||
running: root.state === Constants.startupState.profileFetching
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
d.counter = d.counter - 1000 // decrease 1000 ms
|
||||
|
|
Loading…
Reference in New Issue