diff --git a/StickerSlack/StickerSlackApp.swift b/StickerSlack/StickerSlackApp.swift index a8649b6..8252dbc 100644 --- a/StickerSlack/StickerSlackApp.swift +++ b/StickerSlack/StickerSlackApp.swift @@ -20,9 +20,9 @@ struct StickerSlackApp: App { ContentView(emojiHoarder: emojiHoarder, gifhoarder: gifhoarder) .onOpenURL { url in if let imported = EmojiPack(fromShareLink: url) { + importingEmojiPack = true pack = imported } - importingEmojiPack = true } .sheet(isPresented: $importingEmojiPack) { EmojiPackImporterView(emojiHoarder: emojiHoarder, pack: $pack) diff --git a/StickerSlack/Stickers/Sticker.swift b/StickerSlack/Stickers/Sticker.swift index e199ae0..9816c6a 100644 --- a/StickerSlack/Stickers/Sticker.swift +++ b/StickerSlack/Stickers/Sticker.swift @@ -71,8 +71,12 @@ extension StickerProtocol { if let uiImage = UIImage(data: data), let cgImage = uiImage.cgImage, await !self.localImageURLString.contains(".gif"), - cgImage.width < 300 || cgImage.height < 300 { - data = await resize(image: uiImage, to: CGSize(width: 300, height: 300)).pngData()! + cgImage.width < 500 || cgImage.height < 500 { + 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) return