blank pack, no import;resize larger

This commit is contained in:
neon443 committed 2026-04-24 09:51:18 +01:00
1 parent 5d377644d6
commit dfc85bb0b9
2 files changed
+7 -3

No files matched your search

+1 -1
View File
@@ -20,9 +20,9 @@ struct StickerSlackApp: App {
ContentView(emojiHoarder: emojiHoarder, gifhoarder: gifhoarder) ContentView(emojiHoarder: emojiHoarder, gifhoarder: gifhoarder)
.onOpenURL { url in .onOpenURL { url in
if let imported = EmojiPack(fromShareLink: url) { if let imported = EmojiPack(fromShareLink: url) {
importingEmojiPack = true
pack = imported pack = imported
} }
importingEmojiPack = true
} }
.sheet(isPresented: $importingEmojiPack) { .sheet(isPresented: $importingEmojiPack) {
EmojiPackImporterView(emojiHoarder: emojiHoarder, pack: $pack) EmojiPackImporterView(emojiHoarder: emojiHoarder, pack: $pack)
+6 -2
View File
@@ -71,8 +71,12 @@ extension StickerProtocol {
if let uiImage = UIImage(data: data), if let uiImage = UIImage(data: data),
let cgImage = uiImage.cgImage, let cgImage = uiImage.cgImage,
await !self.localImageURLString.contains(".gif"), await !self.localImageURLString.contains(".gif"),
cgImage.width < 300 || cgImage.height < 300 { cgImage.width < 500 || cgImage.height < 500 {
data = await resize(image: uiImage, to: CGSize(width: 300, height: 300)).pngData()! if await self.localImageURLString.suffix(4) == ".gif" {
} else {
data = await resize(image: uiImage, to: CGSize(width: 500, height: 500)).pngData()!
}
} }
try! await data.write(to: localImageURL) try! await data.write(to: localImageURL)
return return
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.