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

Use video thumbnail in media preview.

This commit is contained in:
John Preston
2020-05-22 17:29:19 +04:00
parent c61f3a0aba
commit c63e2c01ac
3 changed files with 97 additions and 22 deletions

View File

@@ -434,8 +434,9 @@ bool MainWindow::showMediaPreview(
Data::FileOrigin origin,
not_null<DocumentData*> document) {
const auto media = document->activeMediaView();
const auto preview = Data::VideoPreviewState(media.get());
if (!document->sticker()
&& (!document->isAnimation() || !media || !media->loaded())) {
&& (!document->isAnimation() || !preview.loaded())) {
return false;
}
if (!_mediaPreview) {