From c08e6e0fc6a3cb19bb82923646b69d56e1015ea2 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 27 Apr 2017 09:39:45 -0400 Subject: [PATCH 1/3] =?UTF-8?q?Ignore=20=E2=80=9Copen=20with=20Signal?= =?UTF-8?q?=E2=80=9D=20if=20there=20is=20an=20ongoing=20call.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit // FREEBIE --- Signal/src/AppDelegate.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index fb3540edb..026d3d9da 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -265,6 +265,12 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; DDLogWarn(@"Application opened with an unknown URL action: %@", url.host); } } else if ([url.scheme.lowercaseString isEqualToString:@"file"]) { + + if ([Environment getCurrent].callService.call != nil) { + DDLogWarn(@"%@ ignoring 'open with Signal' due to ongoing WebRTC call.", self.tag); + return NO; + } + NSString *filename = url.lastPathComponent; if ([filename stringByDeletingPathExtension].length < 1) { DDLogError(@"Application opened with URL invalid filename: %@", url); From 2cc3232c0197e9ed69626f628ee397e58d402f2b Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 27 Apr 2017 09:42:30 -0400 Subject: [PATCH 2/3] =?UTF-8?q?Fix=20presentation=20of=20=E2=80=9Copen=20w?= =?UTF-8?q?ith=20Signal=E2=80=9D=20errors.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit // FREEBIE --- Signal/src/AppDelegate.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index 026d3d9da..380db42bd 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -369,6 +369,9 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; [controller addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"OK", nil) style:UIAlertActionStyleDefault handler:nil]]; + [[Environment getCurrent].signalsViewController.presentedViewController presentViewController:controller + animated:YES + completion:nil]; } - (void)applicationDidBecomeActive:(UIApplication *)application { From 1b61c3b0ce8dc6f083f4ad749be53b8c8509fea4 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Thu, 27 Apr 2017 10:00:41 -0400 Subject: [PATCH 3/3] fix attachment-import error alert presentation // FREEBIE --- Signal/src/AppDelegate.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index 380db42bd..984651572 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -369,9 +369,10 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; [controller addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"OK", nil) style:UIAlertActionStyleDefault handler:nil]]; - [[Environment getCurrent].signalsViewController.presentedViewController presentViewController:controller - animated:YES - completion:nil]; + + [[Environment getCurrent].signalsViewController presentTopLevelModalViewController:controller + animateDismissal:YES + animatePresentation:YES]; } - (void)applicationDidBecomeActive:(UIApplication *)application {