added clear logos for giphy stickers

This commit is contained in:
neon443 committed 2026-04-03 12:58:18 +01:00
1 parent 7b91de576a
commit 208f97b102
8 files changed
+32 -9

No files matched your search

+1
View File
@@ -14,6 +14,7 @@ import UniformTypeIdentifiers
struct Emoji: StickerProtocol {
var id: String
var name: String
var typeGlyph: String = "slack.logo"
var localImageURLString: String {
let urlString = remoteImageURL.absoluteString
let split = urlString.split(separator: ".")
+2
View File
@@ -12,6 +12,8 @@ import UniformTypeIdentifiers
struct Gif: StickerProtocol {
var id: String
var name: String
var typeGlyph: String = "giphy.logo"
var localImageURLString: String {
let urlString = remoteImageURL.absoluteString
let split = urlString.split(separator: ".")
+1 -1
View File
@@ -57,7 +57,7 @@ extension StickerProtocol {
return
}
func resize(image: UIImage, to targetSize: CGSize) -> UIImage {
func resize(image: UIImage, to targetSize: CGSize) -> UIImage {
let oldSize = image.size
let ratio: (x: CGFloat, y: CGFloat)
ratio.x = targetSize.width / oldSize.width
@@ -12,6 +12,8 @@ protocol StickerProtocol: Codable, Identifiable, Hashable {
var id: String { get set }
var name: String { get set }
var typeGlyph: String { get }
var localImageURL: URL { get }
var localImageURLString: String { get }
var remoteImageURL: URL { get set }
+4 -8
View File
@@ -34,14 +34,10 @@ struct StickerRow<T: Hoarder>: View {
Button {
showTooltip.toggle()
} label: {
if type(of: sticker) == Emoji.self {
Image("slack.logo")
.resizable().scaledToFit()
.frame(width: 20, height: 20)
.foregroundStyle(.gray)
} else if type(of: sticker) == Gif.self {
Text("G")
}
Image(sticker.typeGlyph)
.resizable().scaledToFit()
.frame(maxHeight: 20)
.foregroundStyle(.gray)
}
.buttonStyle(.borderless)
.alert("From Slack", isPresented: $showTooltip) {
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.