Various optimizations

This commit is contained in:
Isaac 2025-03-04 14:13:07 +01:00
parent 1cd77c768b
commit faa765b601
38 changed files with 421 additions and 125 deletions

View file

@ -587,7 +587,8 @@ public func chatMessageAnimatedSticker(postbox: Postbox, userLocation: MediaReso
}
}
public func preloadedStickerPackThumbnail(account: Account, info: StickerPackCollectionInfo, items: [ItemCollectionItem]) -> Signal<Bool, NoError> {
public func preloadedStickerPackThumbnail(account: Account, info: StickerPackCollectionInfo.Accessor, items: [ItemCollectionItem]) -> Signal<Bool, NoError> {
let info = info._parse()
if let thumbnail = info.thumbnail {
let signal = Signal<Bool, NoError> { subscriber in
let fetched = fetchedMediaResource(mediaBox: account.postbox.mediaBox, userLocation: .other, userContentType: .sticker, reference: .stickerPackThumbnail(stickerPack: .id(id: info.id.id, accessHash: info.accessHash), resource: thumbnail.resource)).start()