uikit imageview for plainemojicell

need to do gifs, but ts looking good tbh
some other stuff lowk forgot
This commit is contained in:
Nihaal Sharma committed 2026-05-07 20:29:35 +01:00
1 parent 7f427f387c
commit 645d36afae
6 files changed
+127 -32

No files matched your search

+18 -2
View File
@@ -38,10 +38,26 @@ extension StickerProtocol {
return try? MSSticker(contentsOfFileURL: localImageURL, localizedDescription: name)
}
var isLocal: Bool {
nonisolated var isLocal: Bool {
return FileManager.default.fileExists(atPath: localImageURLString)
}
nonisolated func data() async -> Data? {
var result: (data: Data, response: URLResponse)
do {
result = try await URLSession.shared.data(from: isLocal ? localImageURL : remoteImageURL)
} catch {
print(error.localizedDescription)
return nil
}
return result.data
}
nonisolated func image() async -> UIImage? {
guard let data = await data() else { return nil }
return UIImage(data: data)
}
var image: UIImage? {
if FileManager.default.fileExists(atPath: localImageURLString),
let data = try? Data(contentsOf: localImageURL),
@@ -52,7 +68,7 @@ extension StickerProtocol {
}
}
var type: StickerType {
nonisolated var type: StickerType {
let typeOfSelf = Swift.type(of: self)
if typeOfSelf == Emoji.self {
return .slackEmoji
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.