From 9b92a0ba8eeea84df38f29ee20c384e0afe3ad8a Mon Sep 17 00:00:00 2001 From: manuroe Date: Fri, 25 Sep 2020 13:06:34 +0200 Subject: [PATCH] Complete Security: Make sure the authentication flow display it if auth is not complete yet The complete security flow can be unfortunately triggered from 2 places: AuthVC and MasterTabBarC. On a fresh app installation, during authentication, it was unexpectedly displayed from MasterTabBarC. This prevented authentication flow to complete. The app stayed on the launching animation. This commit fixes this race. --- CHANGES.rst | 1 + Riot/Modules/TabBar/MasterTabBarController.m | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index b925b6529..753a525f5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,6 +13,7 @@ Changes to be released in next version 🐛 Bugfix * Timeline: Hide encrypted history (pre-invite) (#3660). * Fix floating action buttons' images. + * Complete Security: Let the authentication flow display it if this flow is not complete yet. ⚠️ API Changes * diff --git a/Riot/Modules/TabBar/MasterTabBarController.m b/Riot/Modules/TabBar/MasterTabBarController.m index 4700adf4e..7bde05040 100644 --- a/Riot/Modules/TabBar/MasterTabBarController.m +++ b/Riot/Modules/TabBar/MasterTabBarController.m @@ -1032,7 +1032,9 @@ - (void)presentVerifyCurrentSessionAlertIfNeededWithSession:(MXSession*)session { - if (RiotSettings.shared.hideVerifyThisSessionAlert || self.reviewSessionAlertHasBeenDisplayed) + if (RiotSettings.shared.hideVerifyThisSessionAlert + || self.reviewSessionAlertHasBeenDisplayed + || self.authenticationInProgress) { return; }