ui updates to emojpackdetailview

added .type to sticker to get its type
added fromappname to stickertype
This commit is contained in:
neon443 committed 2026-04-14 21:18:58 +01:00
1 parent 988ea730d1
commit cf57bccf2f
8 files changed
+45 -33

No files matched your search

+14 -4
View File
@@ -11,12 +11,11 @@ import Messages
extension StickerProtocol {
var localImageURLString: String {
let containerPath: String
if type(of: self) == Emoji.self {
switch type {
case .slackEmoji:
containerPath = EmojiHoarder.container.safePath
} else if type(of: self) == Gif.self {
case .giphyGifs:
containerPath = GifHoarder.container.safePath
} else {
fatalError("sticker type unrecogniesd")
}
let urlString = remoteImageURL.absoluteString
let split = urlString.split(separator: ".")
@@ -49,6 +48,17 @@ extension StickerProtocol {
}
}
var type: StickerType {
let typeOfSelf = Swift.type(of: self)
if typeOfSelf == Emoji.self {
return .slackEmoji
} else if typeOfSelf == Gif.self {
return .giphyGifs
} else {
fatalError("unrecognised sticker type get crashed lmfao")
}
}
nonisolated
func downloadImage() async throws {
if let data = try? await Data(contentsOf: localImageURL),
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.