okayokay fixed the gifs being too fast

giffrom url uses an async task to grab data

it can kidna stop animating when spam switching views, other than that its fine yay
ts a tomorrow problem
This commit is contained in:
neon443 committed 2025-11-20 21:44:17 +00:00
1 parent 5b0d6ab9ff
commit 82f79b0ad5
3 files changed
+15 -43

No files matched your search

+2 -5
View File
@@ -10,11 +10,8 @@ import UIKit
class GifManager {
static let defaultDuration: Double = 0.083333333333333329
static func gifFrom(url: URL) -> [(frame: CGImage, showFor: Double)] {
// let url = URL(string: "https://emoji.slack-edge.com/T0266FRGM/yay-bounce/046cfcc7ed81030f.gif")!
// guard let source = CGImageSourceCreateWithURL(url as CFURL, nil) else { fatalError("couldnt create source") }
guard let data = try? Data(contentsOf: url) else { return [] }
static func gifFrom(url: URL) async -> [(frame: CGImage, showFor: Double)] {
guard let (data, _) = try? await URLSession.shared.data(from: url) else { return [] }
return gifFrom(data: data)
}
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.