diff --git a/src/app/modules/startup/models/fetching_data_model.nim b/src/app/modules/startup/models/fetching_data_model.nim index b551d80e1a..5f387f0466 100644 --- a/src/app/modules/startup/models/fetching_data_model.nim +++ b/src/app/modules/startup/models/fetching_data_model.nim @@ -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]) diff --git a/ui/app/AppLayouts/Onboarding/views/ProfileFetchingView.qml b/ui/app/AppLayouts/Onboarding/views/ProfileFetchingView.qml index e08f0e450d..1231988e2e 100644 --- a/ui/app/AppLayouts/Onboarding/views/ProfileFetchingView.qml +++ b/ui/app/AppLayouts/Onboarding/views/ProfileFetchingView.qml @@ -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