Refactoring

This commit is contained in:
Isaac 2026-04-07 11:31:22 +02:00
parent 95a03d9931
commit d147c63b68
23 changed files with 2739 additions and 2762 deletions

View file

@ -31,6 +31,7 @@ swift_library(
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
"//submodules/Display:Display",
"//submodules/TelegramUI/Components/AnimationCache:AnimationCache",
"//submodules/TelegramUI/Components/DCTAnimationCacheImpl:DCTAnimationCacheImpl",
"//submodules/TelegramUI/Components/VideoAnimationCache:VideoAnimationCache",
"//submodules/TelegramUI/Components/LottieAnimationCache:LottieAnimationCache",
"//submodules/rlottie:RLottieBinding",

View file

@ -3,6 +3,7 @@ import UIKit
import Display
import AnimationCache
import DCTAnimationCacheImpl
import SwiftSignalKit
import VideoAnimationCache
import LottieAnimationCache
@ -50,7 +51,7 @@ public final class ViewController: UIViewController {
let basePath = NSTemporaryDirectory() + "/animation-cache"
let _ = try? FileManager.default.removeItem(atPath: basePath)
let _ = try? FileManager.default.createDirectory(at: URL(fileURLWithPath: basePath), withIntermediateDirectories: true)
self.cache = AnimationCacheImpl(basePath: basePath, allocateTempFile: {
self.cache = DCTAnimationCacheImpl(basePath: basePath, allocateTempFile: {
return basePath + "/\(Int64.random(in: 0 ... Int64.max))"
})