2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Start using document bytes from DocumentMedia.

This commit is contained in:
John Preston
2020-04-09 16:27:53 +04:00
parent 888e42df34
commit 33f4946242
31 changed files with 190 additions and 169 deletions

View File

@@ -315,9 +315,10 @@ void EditCaptionBox::prepareGifPreview(DocumentData* document) {
const auto callback = [=](Media::Clip::Notification notification) {
clipCallback(notification);
};
_gifMedia = document ? document->createMediaView() : nullptr;
if (document && document->isAnimation() && document->loaded()) {
_gifPreview = Media::Clip::MakeReader(
document,
_gifMedia.get(),
_msgId,
callback);
} else if (!isListEmpty) {