Fix handling of URLs in SAE.

pull/1/head
Matthew Chen 7 years ago
parent efbcdb98fb
commit c2787341ae

@ -698,7 +698,11 @@ public class ShareViewController: UIViewController, ShareViewDelegate, SAEFailed
} }
// See comments on NSItemProvider+OWS.h. // See comments on NSItemProvider+OWS.h.
if srcUtiType == kUTTypeURL as String {
itemProvider.loadItem(forTypeIdentifier: srcUtiType, options: nil, completionHandler: loadCompletion)
} else {
itemProvider.loadData(forTypeIdentifier: srcUtiType, options: nil, completionHandler: loadCompletion) itemProvider.loadData(forTypeIdentifier: srcUtiType, options: nil, completionHandler: loadCompletion)
}
return promise.then { [weak self] (itemUrl: URL, utiType: String) -> Promise<SignalAttachment> in return promise.then { [weak self] (itemUrl: URL, utiType: String) -> Promise<SignalAttachment> in
guard let strongSelf = self else { guard let strongSelf = self else {

Loading…
Cancel
Save