Various improvements

This commit is contained in:
Ilya Laktyushin
2024-10-29 13:46:22 +04:00
parent 4fa367c491
commit bd1cbdae5a
28 changed files with 89 additions and 62 deletions

View File

@@ -62,10 +62,10 @@ func cacheStickerPack(transaction: Transaction, info: StickerPackCollectionInfo,
}
}
func _internal_cachedStickerPack(postbox: Postbox, network: Network, reference: StickerPackReference, forceRemote: Bool) -> Signal<CachedStickerPackResult, NoError> {
func _internal_cachedStickerPack(postbox: Postbox, network: Network, reference: StickerPackReference, forceRemote: Bool, ignoreCache: Bool = false) -> Signal<CachedStickerPackResult, NoError> {
return postbox.transaction { transaction -> CachedStickerPackResult? in
if let (info, items, local) = cachedStickerPack(transaction: transaction, reference: reference) {
if local {
if local && !ignoreCache {
return .result(info, items, true)
}
}