From b4bcbca89279c9ed4b169d6762f4768caac06ef3 Mon Sep 17 00:00:00 2001 From: giomfo Date: Mon, 23 May 2016 15:39:48 +0200 Subject: [PATCH] Bug Fix: 'Not supported voip call' prompt failed https://github.com/vector-im/vector-ios/issues/336 --- Vector/AppDelegate.m | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Vector/AppDelegate.m b/Vector/AppDelegate.m index 4904fbe8a..82af3caf1 100644 --- a/Vector/AppDelegate.m +++ b/Vector/AppDelegate.m @@ -491,6 +491,13 @@ NSString *const kAppDelegateDidTapStatusBarNotification = @"kAppDelegateDidTapSt [self.window.rootViewController dismissViewControllerAnimated:NO completion:^{ [self popToHomeViewControllerAnimated:NO completion:completion]; + + // Restore noCallSupportAlert if any + if (noCallSupportAlert) + { + NSLog(@"[AppDelegate] restoreInitialDisplay: keep visible noCall support alert"); + [noCallSupportAlert showInViewController:self.window.rootViewController]; + } }]; } else @@ -715,10 +722,10 @@ NSString *const kAppDelegateDidTapStatusBarNotification = @"kAppDelegateDidTapSt { _completionHandler = completionHandler; - NSLog(@"[AppDelegate] : starts a background sync"); + NSLog(@"[AppDelegate] didReceiveRemoteNotification: starts a background sync"); [dedicatedAccount backgroundSync:20000 success:^{ - NSLog(@"[AppDelegate]: the background sync succeeds"); + NSLog(@"[AppDelegate] didReceiveRemoteNotification: the background sync succeeds"); if (_completionHandler) { @@ -726,7 +733,7 @@ NSString *const kAppDelegateDidTapStatusBarNotification = @"kAppDelegateDidTapSt _completionHandler = nil; } } failure:^(NSError *error) { - NSLog(@"[AppDelegate]: the background sync fails"); + NSLog(@"[AppDelegate] didReceiveRemoteNotification: the background sync fails"); if (_completionHandler) { @@ -741,7 +748,7 @@ NSString *const kAppDelegateDidTapStatusBarNotification = @"kAppDelegateDidTapSt } else { - NSLog(@"[AppDelegate]: didReceiveRemoteNotification : no linked session / account has been found."); + NSLog(@"[AppDelegate] didReceiveRemoteNotification : no linked session / account has been found."); } } completionHandler(UIBackgroundFetchResultNoData);