mirror of
https://github.com/neon443/StickerSlack.git
synced 2026-03-11 13:26:17 +00:00
fix downloading images 💀
make downloadimage not return a uiimage cos its not used anywhere
This commit is contained in:
@@ -71,15 +71,14 @@ struct Emoji: Codable, Identifiable, Hashable {
|
||||
self.remoteImageURL = url
|
||||
}
|
||||
|
||||
nonisolated
|
||||
func downloadImage() async throws -> UIImage {
|
||||
func downloadImage() async throws {
|
||||
if let data = try? await Data(contentsOf: localImageURL),
|
||||
let uiimage = UIImage(data: data) {
|
||||
return uiimage
|
||||
return
|
||||
}
|
||||
let (data, _) = try await URLSession.shared.data(from: remoteImageURL)
|
||||
try! await data.write(to: localImageURL)
|
||||
return UIImage(data: data)!
|
||||
return
|
||||
}
|
||||
|
||||
func deleteImage() {
|
||||
|
||||
Reference in New Issue
Block a user