diff --git a/src/app/boot/app_controller.nim b/src/app/boot/app_controller.nim index 76e8b6c68c..9694be70f8 100644 --- a/src/app/boot/app_controller.nim +++ b/src/app/boot/app_controller.nim @@ -281,6 +281,7 @@ proc delete*(self: AppController) = self.gifService.delete if not self.startupModule.isNil: self.startupModule.delete + self.startupModule = nil self.mainModule.delete self.languageService.delete @@ -460,6 +461,7 @@ proc finishAppLoading*(self: AppController) = if not self.startupModule.isNil: self.startupModule.delete + self.startupModule = nil proc logout*(self: AppController) = self.generalService.logout() diff --git a/src/app/modules/startup/module.nim b/src/app/modules/startup/module.nim index 3b1383b0b0..f5a491748b 100644 --- a/src/app/modules/startup/module.nim +++ b/src/app/modules/startup/module.nim @@ -65,11 +65,16 @@ proc newModule*[T](delegate: T, profileService, keycardService) method delete*[T](self: Module[T]) = + singletonInstance.engine.setRootContextProperty("startupModule", newQVariant()) self.view.delete + self.view = nil self.viewVariant.delete + self.viewVariant = nil self.controller.delete + self.controller = nil if not self.keycardSharedModule.isNil: self.keycardSharedModule.delete + self.keycardSharedModule = nil proc extractImages(self: Module, account: AccountDto, thumbnailImage: var string, largeImage: var string) = @@ -394,10 +399,10 @@ method onNodeLogin*[T](self: Module[T], error: string) = if err.len > 0: self.logoutAndDisplayError(err, StartupErrorType.UnknownType) return - self.delegate.finishAppLoading() if currStateObj.flowType() != FlowType.AppLogin: discard self.controller.storeIdentityImage() self.controller.cleanTmpData() + self.delegate.finishAppLoading() else: self.moveToStartupState() if currStateObj.flowType() == FlowType.AppLogin: