redid how downloaded emojis are made, abolished isLocal cos its too slow lmao

adding name to each filename so its easier to make a list of downloaded thingeis
fix using absolutestring instead of path
ts lowk fried im optimising th out of ts
This commit is contained in:
neon443 committed 2026-04-03 21:36:04 +01:00
1 parent 208f97b102
commit 91edcb6441
7 files changed
+22 -24

No files matched your search

+1 -5
View File
@@ -13,12 +13,8 @@ extension StickerProtocol {
return URL(string: localImageURLString)!
}
var isLocal: Bool {
return (try? Data(contentsOf: localImageURL)) != nil
}
var msSticker: MSSticker? {
guard isLocal else {
guard FileManager.default.fileExists(atPath: localImageURLString) else {
return nil
}
return try? MSSticker(contentsOfFileURL: localImageURL, localizedDescription: name)
@@ -18,8 +18,6 @@ protocol StickerProtocol: Codable, Identifiable, Hashable {
var localImageURLString: String { get }
var remoteImageURL: URL { get set }
var isLocal: Bool { get }
var msSticker: MSSticker? { get }
var image: UIImage? { get }
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.