Prompt the user before logging out in case of click on register link.

vector-im/riot-ios#1838
This commit is contained in:
giomfo
2018-04-17 21:39:31 +02:00
parent bff0954535
commit 747153fcb7
4 changed files with 114 additions and 65 deletions
+9 -3
View File
@@ -372,13 +372,19 @@
}
else
{
NSLog(@"[MasterTabBarController] Universal link: Logout current sessions and open AuthViewController to complete the registration");
NSLog(@"[MasterTabBarController] Universal link: Prompt to logout current sessions and open AuthViewController to complete the registration");
// Keep a ref on the params
authViewControllerRegistrationParameters = parameters;
// And do a logout out. It will then display AuthViewController
[[AppDelegate theDelegate] logout];
// Prompt to logout. It will then display AuthViewController if the user is logged out.
[[AppDelegate theDelegate] logoutWithConfirmation:YES completion:^(BOOL isLoggedOut) {
if (!isLoggedOut)
{
// Reset temporary params
authViewControllerRegistrationParameters = nil;
}
}];
}
}