Address yet another edge cases around pasteboards that contain both textual and non-textual content, e.g. a gif and the URL of that gif.
// FREEBIE
This commit is contained in:
parent
aa5730dc11
commit
9eaeba9af3
|
@ -314,10 +314,6 @@ class SignalAttachment: NSObject {
|
|||
}
|
||||
let pasteboardUTISet = Set<String>(pasteboardUTITypes[0])
|
||||
|
||||
if pasteboardUTISet.contains(kUTTypeURL as String) {
|
||||
return true
|
||||
}
|
||||
|
||||
// The pasteboard can be populated with multiple UTI types
|
||||
// with different payloads. iMessage for example will copy
|
||||
// an animated GIF to the pasteboard with the following UTI
|
||||
|
@ -341,6 +337,9 @@ class SignalAttachment: NSObject {
|
|||
hasNonTextUTIType = true
|
||||
}
|
||||
}
|
||||
if pasteboardUTISet.contains(kUTTypeURL as String) {
|
||||
hasTextUTIType = true
|
||||
}
|
||||
if hasNonTextUTIType {
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue