Merge branch 'mkirk/fix-share'

pull/1/head
Michael Kirk 8 years ago
commit 37d408cc74

@ -312,6 +312,7 @@ NS_ASSUME_NONNULL_BEGIN
actionString,
self.interaction.uniqueId,
[self.mediaItem class]);
OWSAssert(NO);
}
- (TSAttachmentStream *)attachmentStream

@ -124,9 +124,10 @@ NS_ASSUME_NONNULL_BEGIN
UIImageWriteToSavedPhotosAlbum(self.image, nil, nil, nil);
return;
}
// Shouldn't get here, as only supported actions should be exposed via canPerformEditingAction
DDLogError(@"'%@' action unsupported for %@: attachmentId=%@", actionString, self.class, self.attachmentId);
OWSAssert(NO);
}
@end

@ -275,6 +275,7 @@ NS_ASSUME_NONNULL_BEGIN
NSString *actionString = NSStringFromSelector(action);
DDLogError(
@"Unexpected action: %@ for VideoAttachmentAdapter with contentType: %@", actionString, self.contentType);
OWSAssert(NO);
}
}

@ -4,6 +4,7 @@
#import "AttachmentSharing.h"
#import "TSAttachmentStream.h"
#import "UIUtil.h"
@implementation AttachmentSharing
@ -24,19 +25,22 @@
]
applicationActivities:@[
]];
[activityViewController setCompletionWithItemsHandler:^(UIActivityType __nullable activityType,
BOOL completed,
NSArray * __nullable returnedItems,
NSError * __nullable activityError) {
BOOL completed,
NSArray *__nullable returnedItems,
NSError *__nullable activityError) {
DDLogDebug(@"%@ applying signal appearence", self.tag);
[UIUtil applySignalAppearence];
if (activityError) {
DDLogInfo(@"%@ Failed to share with activityError: %@", self.tag, activityError);
} else if (completed) {
DDLogInfo(@"%@ Did share with activityType: %@", self.tag, activityType);
}
}];
// Find the frontmost presented UIViewController from which to present the
// share view.
UIWindow *window = [UIApplication sharedApplication].keyWindow;
@ -47,7 +51,10 @@
OWSAssert(fromViewController);
[fromViewController presentViewController:activityViewController
animated:YES
completion:nil];
completion:^{
DDLogDebug(@"%@ applying default system appearence", self.tag);
[UIUtil applyDefaultSystemAppearence];
}];
}
#pragma mark - Logging

Loading…
Cancel
Save