Skip to content

Commit

Permalink
Merge pull request #1090 from TdoubleG/master
Browse files Browse the repository at this point in the history
Run sharing in main thread
  • Loading branch information
EddyVerbruggen committed Jul 14, 2020
2 parents 2405584 + 0191cd1 commit 5da61cf
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/ios/SocialSharing.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ - (void)shareWithOptions:(CDVInvokedUrlCommand*)command {
}

- (void)shareInternal:(CDVInvokedUrlCommand*)command withOptions:(NSDictionary*)options isBooleanResponse:(BOOL)boolResponse {
[self.commandDelegate runInBackground:^{ //avoid main thread block especially if sharing big files from url
if (!NSClassFromString(@"UIActivityViewController")) {
CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"];
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
Expand Down Expand Up @@ -211,7 +210,6 @@ - (void)shareInternal:(CDVInvokedUrlCommand*)command withOptions:(NSDictionary*)
}
[[self getTopMostViewController] presentViewController:activityVC animated:YES completion:nil];
});
}];
}

- (void)shareViaTwitter:(CDVInvokedUrlCommand*)command {
Expand Down

0 comments on commit 5da61cf

Please sign in to comment.