mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-24 04:28:58 +00:00
fix(@desktop/onboarding): the app crashes when converting a keycard to a regular account, or just being in loading state forever
Fixes: #11507
This commit is contained in:
parent
51edc1b256
commit
7849d03707
@ -163,6 +163,9 @@ method moveToAppState*[T](self: Module[T]) =
|
|||||||
method moveToStartupState*[T](self: Module[T]) =
|
method moveToStartupState*[T](self: Module[T]) =
|
||||||
self.view.setAppState(AppState.StartupState)
|
self.view.setAppState(AppState.StartupState)
|
||||||
|
|
||||||
|
proc moveToAppEncryptionProcessState[T](self: Module[T]) =
|
||||||
|
self.view.setAppState(AppState.AppEncryptionProcessState)
|
||||||
|
|
||||||
method startUpUIRaised*[T](self: Module[T]) =
|
method startUpUIRaised*[T](self: Module[T]) =
|
||||||
self.view.startUpUIRaised()
|
self.view.startUpUIRaised()
|
||||||
|
|
||||||
@ -412,7 +415,6 @@ method onNodeLogin*[T](self: Module[T], error: string) =
|
|||||||
return
|
return
|
||||||
self.delegate.logout()
|
self.delegate.logout()
|
||||||
self.view.setCurrentStartupState(newLoginKeycardConvertedToRegularAccountState(currStateObj.flowType(), nil))
|
self.view.setCurrentStartupState(newLoginKeycardConvertedToRegularAccountState(currStateObj.flowType(), nil))
|
||||||
self.moveToStartupState()
|
|
||||||
else:
|
else:
|
||||||
let err = self.delegate.userLoggedIn(recoverAccount = false)
|
let err = self.delegate.userLoggedIn(recoverAccount = false)
|
||||||
if err.len > 0:
|
if err.len > 0:
|
||||||
@ -533,7 +535,13 @@ method onLocalPairingStatusUpdate*[T](self: Module[T], status: LocalPairingStatu
|
|||||||
self.view.onLocalPairingStatusUpdate(status)
|
self.view.onLocalPairingStatusUpdate(status)
|
||||||
|
|
||||||
method onReencryptionProcessStarted*[T](self: Module[T]) =
|
method onReencryptionProcessStarted*[T](self: Module[T]) =
|
||||||
self.view.onReencryptionProcessStarted()
|
self.moveToAppEncryptionProcessState()
|
||||||
|
|
||||||
method onReencryptionProcessFinished*[T](self: Module[T]) =
|
method onReencryptionProcessFinished*[T](self: Module[T]) =
|
||||||
self.view.onReencryptionProcessFinished()
|
let currStateObj = self.view.currentStartupStateObj()
|
||||||
|
if not currStateObj.isNil and
|
||||||
|
currStateObj.flowType() == FlowType.LostKeycardConvertToRegularAccount and
|
||||||
|
currStateObj.stateType() == StateType.LoginKeycardConvertedToRegularAccount:
|
||||||
|
self.moveToStartupState()
|
||||||
|
return
|
||||||
|
self.moveToLoadingAppState()
|
@ -104,7 +104,7 @@ QtObject:
|
|||||||
|
|
||||||
proc onSecondaryActionClicked*(self: View) {.slot.} =
|
proc onSecondaryActionClicked*(self: View) {.slot.} =
|
||||||
self.delegate.onSecondaryActionClicked()
|
self.delegate.onSecondaryActionClicked()
|
||||||
|
|
||||||
proc onTertiaryActionClicked*(self: View) {.slot.} =
|
proc onTertiaryActionClicked*(self: View) {.slot.} =
|
||||||
self.delegate.onTertiaryActionClicked()
|
self.delegate.onTertiaryActionClicked()
|
||||||
|
|
||||||
@ -373,9 +373,3 @@ QtObject:
|
|||||||
|
|
||||||
proc validateLocalPairingConnectionString*(self: View, connectionString: string): string {.slot.} =
|
proc validateLocalPairingConnectionString*(self: View, connectionString: string): string {.slot.} =
|
||||||
return self.delegate.validateLocalPairingConnectionString(connectionString)
|
return self.delegate.validateLocalPairingConnectionString(connectionString)
|
||||||
|
|
||||||
proc onReencryptionProcessStarted*(self: View) =
|
|
||||||
self.setAppState(AppState.AppEncryptionProcessState)
|
|
||||||
|
|
||||||
proc onReencryptionProcessFinished*(self: View) =
|
|
||||||
self.setAppState(AppState.AppLoadingState)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user