From dc9f9fb66b9ff977578dbddbc666714bb84e3f1c Mon Sep 17 00:00:00 2001 From: manuroe Date: Fri, 24 Aug 2018 12:31:57 +0200 Subject: [PATCH] GDPRConsentViewController: close it once the user has given their consent Do not wait anymore for the completion of the creation of the room with riot-bot --- Riot/AppDelegate.m | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Riot/AppDelegate.m b/Riot/AppDelegate.m index b31e9c60d..84500155a 100644 --- a/Riot/AppDelegate.m +++ b/Riot/AppDelegate.m @@ -4067,20 +4067,17 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN - (void)gdprConsentViewControllerDidConsentToGDPRWithSuccess:(GDPRConsentViewController *)gdprConsentViewController { MXSession *session = mxSessionArray.firstObject; - + + // Leave the GDPR consent right now + [self dismissGDPRConsent]; + + // And create the room with riot bot in // self.onBoardingManager = [[OnBoardingManager alloc] initWithSession:session]; MXWeakify(self); - MXWeakify(gdprConsentViewController); - - [gdprConsentViewController startActivityIndicator]; - void (^createRiotBotDMcompletion)(void) = ^() { - MXStrongifyAndReturnIfNil(self); - - [weakgdprConsentViewController stopActivityIndicator]; - [self dismissGDPRConsent]; + self.onBoardingManager = nil; };