Fix unresponsive soft-logout in the legacy flow. (#6329)

- 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.
This commit is contained in:
Doug
2022-06-21 17:30:10 +01:00
committed by GitHub
parent d4bd94ea6d
commit c423410cb1
6 changed files with 37 additions and 61 deletions
+9 -3
View File
@@ -487,9 +487,15 @@
{
MXLogDebug(@"[MasterTabBarController] showAuthenticationScreenAfterSoftLogout");
AuthenticationService.shared.softLogoutCredentials = credentials;
[self showOnboardingFlowAndResetSessionFlags:NO];
// This method can be called after the user chooses to clear their data as the MXSession
// is opened to call logout from. So we only set the credentials when authentication isn't
// in progress to prevent a second soft logout screen being shown.
if (!self.onboardingCoordinatorBridgePresenter && !self.isOnboardingCoordinatorPreparing)
{
AuthenticationService.shared.softLogoutCredentials = credentials;
[self showOnboardingFlowAndResetSessionFlags:NO];
}
}
- (void)showOnboardingFlowAndResetSessionFlags:(BOOL)resetSessionFlags