mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Various Improvements
This commit is contained in:
parent
6f2c7cf03b
commit
4393227307
58 changed files with 304 additions and 211 deletions
|
|
@ -225,9 +225,9 @@ private func chatMessageStickerPackThumbnailData(postbox: Postbox, resource: Med
|
|||
}
|
||||
}
|
||||
|
||||
public func chatMessageAnimationData(postbox: Postbox, resource: MediaResource, fitzModifier: EmojiFitzModifier? = nil, width: Int, height: Int, synchronousLoad: Bool) -> Signal<MediaResourceData, NoError> {
|
||||
public func chatMessageAnimationData(mediaBox: MediaBox, resource: MediaResource, fitzModifier: EmojiFitzModifier? = nil, width: Int, height: Int, synchronousLoad: Bool) -> Signal<MediaResourceData, NoError> {
|
||||
let representation = CachedAnimatedStickerRepresentation(width: Int32(width), height: Int32(height), fitzModifier: fitzModifier)
|
||||
let maybeFetched = postbox.mediaBox.cachedResourceRepresentation(resource, representation: representation, complete: false, fetch: false, attemptSynchronously: synchronousLoad)
|
||||
let maybeFetched = mediaBox.cachedResourceRepresentation(resource, representation: representation, complete: false, fetch: false, attemptSynchronously: synchronousLoad)
|
||||
|
||||
return maybeFetched
|
||||
|> take(1)
|
||||
|
|
@ -235,7 +235,7 @@ public func chatMessageAnimationData(postbox: Postbox, resource: MediaResource,
|
|||
if maybeData.complete {
|
||||
return .single(maybeData)
|
||||
} else {
|
||||
return postbox.mediaBox.cachedResourceRepresentation(resource, representation: representation, complete: false)
|
||||
return mediaBox.cachedResourceRepresentation(resource, representation: representation, complete: false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue