From d26b954d7de0c45a9f24c32d166586bc0068ad14 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Fri, 1 Jun 2018 09:46:11 +0200 Subject: [PATCH] Fix GDPR consent alert not shown after account creation --- Riot/AppDelegate.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Riot/AppDelegate.m b/Riot/AppDelegate.m index 378af11ef..67a5044b0 100644 --- a/Riot/AppDelegate.m +++ b/Riot/AppDelegate.m @@ -4019,9 +4019,12 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN { NSString *consentURI = notification.userInfo[kMXHTTPClientUserConsentNotGivenErrorNotificationConsentURIKey]; if (consentURI - && self.gdprConsentNotGivenAlertController == nil - && self.gdprConsentViewController == nil) + && self.gdprConsentNotGivenAlertController.presentingViewController == nil + && self.gdprConsentViewController.presentingViewController == nil) { + self.gdprConsentNotGivenAlertController = nil; + self.gdprConsentViewController = nil; + UIViewController *presentingViewController = self.window.rootViewController.presentedViewController ?: self.window.rootViewController; __weak typeof(self) weakSelf = self;