simplify function body
This commit is contained in:
parent
70c686942d
commit
8ffcdf7fa0
@ -539,13 +539,7 @@ public class ShareViewController: UIViewController, ShareViewDelegate, SAEFailed
|
||||
private static func itemMatchesSpecificUtiType(itemProvider: NSItemProvider, utiType: String) -> Bool {
|
||||
// URLs, contacts and other special items have to be detected separately.
|
||||
// Many shares (e.g. pdfs) will register many UTI types and/or conform to kUTTypeData.
|
||||
guard itemProvider.registeredTypeIdentifiers.count == 1 else {
|
||||
return false
|
||||
}
|
||||
guard let firstUtiType = itemProvider.registeredTypeIdentifiers.first else {
|
||||
return false
|
||||
}
|
||||
return firstUtiType == utiType
|
||||
return [utiType] == itemProvider.registeredTypeIdentifiers
|
||||
}
|
||||
|
||||
private static func isVisualMediaItem(itemProvider: NSItemProvider) -> Bool {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user