Apply same fix for open with preview functionality

This commit is contained in:
Aleksi Lahikainen 2020-09-08 16:18:33 +03:00
parent 68392bdaf2
commit 64c15579ed

View File

@ -118,6 +118,7 @@ NSString* callbackId = nil;
nil nil
]; ];
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:jsonObj]; pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:jsonObj];
[self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId];
} }
}); });
} }
@ -126,7 +127,11 @@ NSString* callbackId = nil;
@implementation FileOpener2 (UIDocumentInteractionControllerDelegate) @implementation FileOpener2 (UIDocumentInteractionControllerDelegate)
- (void)documentInteractionControllerDidDismissOpenInMenu:(UIDocumentInteractionController *)controller { - (void)documentInteractionControllerDidDismissOpenInMenu:(UIDocumentInteractionController *)controller {
[self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId]; [self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId];
}
- (void)documentInteractionControllerDidEndPreview:(UIDocumentInteractionController *)controller {
[self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId];
} }
- (UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)controller { - (UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)controller {