-
Notifications
You must be signed in to change notification settings - Fork 497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix unresponsive soft-logout in the legacy flow. #6329
Conversation
- Delegate logic to the OnboardingCoordinator like the new flow does. - Reset the credentials on every presentation of authVC. - Make sure not to set the credentials after deleting the data.
self.showClearAllDataConfirmation { | ||
MXLog.debug("[OnboardingCoordinator] showLegacyAuthenticationScreen: Clear all data after soft logout") | ||
self.authenticationService.reset() | ||
self.authenticationFinished = false | ||
self.cancelAuthentication(flow: .login) | ||
AppDelegate.theDelegate().logoutSendingRequestServer(true, completion: nil) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same code as used in the callback from the new flow. @ismailgulek, I was wondering if it would make sense to remove the completion closure and place that code directly in the method to avoid duplication. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah makes sense to me 👍
@@ -606,9 +614,9 @@ final class OnboardingCoordinator: NSObject, OnboardingCoordinatorProtocol { | |||
message: VectorL10n.authSoftlogoutClearDataSignOutMsg, | |||
preferredStyle: .alert) | |||
alertController.addAction(UIAlertAction(title: VectorL10n.cancel, style: .cancel, handler: nil)) | |||
alertController.addAction(UIAlertAction(title: VectorL10n.authSoftlogoutClearDataSignOut, style: .default, handler: { action in | |||
alertController.addAction(UIAlertAction(title: VectorL10n.authSoftlogoutClearDataSignOut, style: .destructive) { action in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Kudos, SonarCloud Quality Gate passed! |
- Delegate logic to the OnboardingCoordinator like the new flow does. - Reset the credentials on every presentation of authVC. - Make sure not to set the credentials after deleting the data.
Closes #5881 (the crash was already fixed as part of #6257) by making sure that splash screen/use case screen is presented after choosing to delete all data when using the old auth flow. This is done by
OnboardingCoordinator
like the new flow does.