mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-27 17:40:38 +00:00
Fix screenshots sharing on iOS 16.4
This commit is contained in:
parent
eb3cbfe6f6
commit
d3e71cea74
1 changed files with 7 additions and 4 deletions
|
@ -65,14 +65,14 @@ enum StatusEditorUTTypeSupported: String, CaseIterable {
|
|||
return transferable
|
||||
} else if isGif, let transferable = await getGifTransferable(item: item) {
|
||||
return transferable
|
||||
} else if let transferable = await getImageTansferable(item: item) {
|
||||
return transferable
|
||||
}
|
||||
let compressor = StatusEditorCompressor()
|
||||
let result = try await item.loadItem(forTypeIdentifier: rawValue)
|
||||
if self == .jpeg || self == .png || self == .tiff || self == .image || self == .uiimage || self == .adobeRawImage {
|
||||
if let image = result as? UIImage {
|
||||
return image
|
||||
if let image = result as? UIImage,
|
||||
let compressedData = try? await compressor.compressImageForUpload(image),
|
||||
let compressedImage = UIImage(data: compressedData) {
|
||||
return compressedImage
|
||||
} else if let imageURL = result as? URL,
|
||||
let compressedData = await compressor.compressImageFrom(url: imageURL),
|
||||
let image = UIImage(data: compressedData)
|
||||
|
@ -84,6 +84,9 @@ enum StatusEditorUTTypeSupported: String, CaseIterable {
|
|||
return image
|
||||
}
|
||||
}
|
||||
if let transferable = await getImageTansferable(item: item) {
|
||||
return transferable
|
||||
}
|
||||
if let url = result as? URL {
|
||||
return url.absoluteString
|
||||
} else if let text = result as? String {
|
||||
|
|
Loading…
Reference in a new issue