Commit 8238f3f3 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

sharing: fix exception when touch the share button on iPad on iOS 8 (closes #13419)

parent 0cd909a8
......@@ -31,6 +31,8 @@
#ifndef NDEBUG
#define APLog(format, ...) NSLog(format, ## __VA_ARGS__)
......@@ -1337,7 +1337,6 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
indexPaths = [self.tableView indexPathsForSelectedRows];
NSUInteger count = indexPaths.count;
if (count) {
NSMutableArray /* NSURL */ *fileURLobjects = [[NSMutableArray alloc] initWithCapacity:count];
......@@ -1392,6 +1391,9 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
UIActivityViewController *controller = [[UIActivityViewController alloc] initWithActivityItems:fileURLobjects applicationActivities:@[_openInActivity]];
controller.popoverPresentationController.sourceView = self.navigationController.toolbar;
controller.completionHandler = ^(NSString *activityType, BOOL completed) {
APLog(@"UIActivityViewController finished with activity type: %@, completed: %i", activityType, completed);
......@@ -1411,7 +1413,6 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
// Just in case, we could call enableInteractionBlock here. Since we are disabling touch interaction for the entire UI, to be safe that we return to the proper state: re-enable everything (if presentViewController:animated:completion: failed for some reason). But UIApplication gives us a warning even if we check isIgnoringInteractionEvents, so do not call it for now.
// enableInteractionBlock();
[self.navigationController presentViewController:controller animated:YES completion:enableInteractionBlock];
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment