MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / showMediaPreview

Method showMediaPreview

Telegram/SourceFiles/mainwindow.cpp:519–537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517}
518
519bool MainWindow::showMediaPreview(
520 Data::FileOrigin origin,
521 not_null<DocumentData*> document) {
522 const auto media = document->activeMediaView();
523 const auto preview = Data::VideoPreviewState(media.get());
524 if (!document->sticker()
525 && (!document->isAnimation() || !preview.loaded())) {
526 return false;
527 }
528 if (!_mediaPreview) {
529 _mediaPreview.create(bodyWidget(), sessionController());
530 updateControlsGeometry();
531 }
532 if (_mediaPreview->isHidden()) {
533 fixOrder();
534 }
535 _mediaPreview->showPreview(origin, document);
536 return true;
537}
538
539bool MainWindow::showMediaPreview(
540 Data::FileOrigin origin,

Callers

nothing calls this directly

Calls 9

VideoPreviewStateClass · 0.85
isAnimationMethod · 0.80
activeMediaViewMethod · 0.45
getMethod · 0.45
stickerMethod · 0.45
loadedMethod · 0.45
createMethod · 0.45
isHiddenMethod · 0.45
showPreviewMethod · 0.45

Tested by

no test coverage detected