fix(@desktop/onboarding): startup stuck when entering wrong password
Fixes: #6812
This commit is contained in:
parent
68d577aa5d
commit
55cb3c3757
|
@ -68,7 +68,7 @@ proc newController*(delegate: io_interface.AccessInterface,
|
|||
result.tmpRecoverUsingSeedPhraseWhileLogin = false
|
||||
|
||||
# Forward declaration
|
||||
proc cleanTmpData(self: Controller)
|
||||
proc cleanTmpData*(self: Controller)
|
||||
|
||||
proc delete*(self: Controller) =
|
||||
discard
|
||||
|
@ -77,7 +77,6 @@ proc init*(self: Controller) =
|
|||
self.events.on(SignalType.NodeLogin.event) do(e:Args):
|
||||
let signal = NodeSignal(e)
|
||||
self.delegate.onNodeLogin(signal.event.error)
|
||||
self.cleanTmpData()
|
||||
|
||||
self.events.on(SignalType.NodeStopped.event) do(e:Args):
|
||||
self.events.emit("nodeStopped", Args())
|
||||
|
@ -191,7 +190,7 @@ proc setRecoverUsingSeedPhraseWhileLogin*(self: Controller, value: bool) =
|
|||
proc getRecoverUsingSeedPhraseWhileLogin*(self: Controller): bool =
|
||||
return self.tmpRecoverUsingSeedPhraseWhileLogin
|
||||
|
||||
proc cleanTmpData(self: Controller) =
|
||||
proc cleanTmpData*(self: Controller) =
|
||||
self.tmpSelectedLoginAccountKeyUid = ""
|
||||
self.tmpProfileImageDetails = ProfileImageDetails()
|
||||
self.tmpKeychainErrorOccurred = true
|
||||
|
|
|
@ -222,10 +222,12 @@ method onNodeLogin*[T](self: Module[T], error: string) =
|
|||
quit() # quit the app
|
||||
|
||||
if error.len == 0:
|
||||
self.controller.cleanTmpData()
|
||||
self.delegate.userLoggedIn()
|
||||
if currStateObj.flowType() != FlowType.AppLogin:
|
||||
self.controller.storeIdentityImage()
|
||||
else:
|
||||
self.view.setAppState(AppState.StartupState)
|
||||
if currStateObj.flowType() == FlowType.AppLogin:
|
||||
self.emitAccountLoginError(error)
|
||||
else:
|
||||
|
|
13
ui/main.qml
13
ui/main.qml
|
@ -130,8 +130,14 @@ StatusWindow {
|
|||
}
|
||||
|
||||
function onAppStateChanged(state) {
|
||||
if(state === Constants.appState.appLoading) {
|
||||
if(state === Constants.appState.startup) {
|
||||
// we're here only in case of error when we're returning from the app loading state
|
||||
loader.sourceComponent = undefined
|
||||
startupOnboarding.visible = true
|
||||
}
|
||||
else if(state === Constants.appState.appLoading) {
|
||||
loader.sourceComponent = appLoadingAnimation
|
||||
startupOnboarding.visible = false
|
||||
}
|
||||
else if(state === Constants.appState.main) {
|
||||
// We set main module to the Global singleton once user is logged in and we move to the main app.
|
||||
|
@ -150,10 +156,9 @@ StatusWindow {
|
|||
if (localAccountSensitiveSettings.hiddenCommunityBackUpBanners === "") {
|
||||
localAccountSensitiveSettings.hiddenCommunityBackUpBanners = [];
|
||||
}
|
||||
startupOnboarding.unload()
|
||||
startupOnboarding.visible = false
|
||||
}
|
||||
|
||||
startupOnboarding.unload()
|
||||
startupOnboarding.visible = false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue