Emoji status and reaction improvements

This commit is contained in:
Ali
2022-08-26 13:33:32 +03:00
parent e26c4a6bf0
commit c535d51621
50 changed files with 848 additions and 379 deletions

View File

@@ -19,6 +19,8 @@ import PresentationDataUtils
import MeshAnimationCache
import FetchManagerImpl
import InAppPurchaseManager
import AnimationCache
import MultiAnimationRenderer
private final class DeviceSpecificContactImportContext {
let disposable = MetaDisposable()
@@ -160,6 +162,9 @@ public final class AccountContextImpl: AccountContext {
public let cachedGroupCallContexts: AccountGroupCallContextCache
public let meshAnimationCache: MeshAnimationCache
public let animationCache: AnimationCache
public let animationRenderer: MultiAnimationRenderer
private var animatedEmojiStickersDisposable: Disposable?
public private(set) var animatedEmojiStickers: [String: [StickerPackItem]] = [:]
@@ -204,6 +209,11 @@ public final class AccountContextImpl: AccountContext {
self.cachedGroupCallContexts = AccountGroupCallContextCacheImpl()
self.meshAnimationCache = MeshAnimationCache(mediaBox: account.postbox.mediaBox)
self.animationCache = AnimationCacheImpl(basePath: self.account.postbox.mediaBox.basePath + "/animation-cache", allocateTempFile: {
return TempBox.shared.tempFile(fileName: "file").path
})
self.animationRenderer = MultiAnimationRendererImpl()
let updatedLimitsConfiguration = account.postbox.preferencesView(keys: [PreferencesKeys.limitsConfiguration])
|> map { preferences -> LimitsConfiguration in
return preferences.values[PreferencesKeys.limitsConfiguration]?.get(LimitsConfiguration.self) ?? LimitsConfiguration.defaultValue