Ignore server errors (network error, etc.) when login out the user after 3 incorrect PIN entered.
This commit is contained in:
parent
cd90bb255f
commit
55ddf72168
@ -61,6 +61,7 @@ import javax.inject.Inject
|
||||
data class MainActivityArgs(
|
||||
val clearCache: Boolean = false,
|
||||
val clearCredentials: Boolean = false,
|
||||
val ignoreLogoutServerError: Boolean = false,
|
||||
val isUserLoggedOut: Boolean = false,
|
||||
val isAccountDeactivated: Boolean = false,
|
||||
val isSoftLogout: Boolean = false
|
||||
@ -238,6 +239,7 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
|
||||
return MainActivityArgs(
|
||||
clearCache = argsFromIntent?.clearCache ?: false,
|
||||
clearCredentials = argsFromIntent?.clearCredentials ?: false,
|
||||
ignoreLogoutServerError = argsFromIntent?.ignoreLogoutServerError ?: false,
|
||||
isUserLoggedOut = argsFromIntent?.isUserLoggedOut ?: false,
|
||||
isAccountDeactivated = argsFromIntent?.isAccountDeactivated ?: false,
|
||||
isSoftLogout = argsFromIntent?.isSoftLogout ?: false
|
||||
@ -263,7 +265,7 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
|
||||
}
|
||||
}
|
||||
args.clearCredentials -> {
|
||||
signout(session, onboardingStore, ignoreServerError = false)
|
||||
signout(session, onboardingStore, ignoreServerError = args.ignoreLogoutServerError)
|
||||
}
|
||||
args.clearCache -> {
|
||||
lifecycleScope.launch {
|
||||
|
||||
@ -162,6 +162,12 @@ class PinFragment :
|
||||
}
|
||||
|
||||
private fun launchResetPinFlow() {
|
||||
MainActivity.restartApp(requireActivity(), MainActivityArgs(clearCredentials = true))
|
||||
MainActivity.restartApp(
|
||||
activity = requireActivity(),
|
||||
args = MainActivityArgs(
|
||||
clearCredentials = true,
|
||||
ignoreLogoutServerError = true,
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user