Video avatar fixes

This commit is contained in:
Ilya Laktyushin
2020-07-10 22:00:41 +03:00
parent 9500196d5b
commit 28394131a5
4 changed files with 18 additions and 6 deletions

View File

@@ -130,9 +130,8 @@ public func initialAvatarGalleryEntries(account: Account, peer: Peer) -> Signal<
initialPhoto = photo
}
if let photo = initialPhoto {
if let photo = initialPhoto, !photo.videoRepresentations.isEmpty {
return [.topImage(photo.representations.map({ ImageRepresentationWithReference(representation: $0, reference: MediaResourceReference.standalone(resource: $0.resource)) }), photo.videoRepresentations, nil, nil, nil)]
// return [.image(photo.imageId, photo.reference, photo.representations.map({ ImageRepresentationWithReference(representation: $0, reference: MediaResourceReference.standalone(resource: $0.resource)) }), photo.videoRepresentations, peer, 0, nil, nil, photo.immediateThumbnailData, nil)]
} else {
return initialEntries
}