| 901 | } |
| 902 | |
| 903 | void DocumentData::loadVideoThumbnail(Data::FileOrigin origin) { |
| 904 | const auto autoLoading = false; |
| 905 | const auto finalCheck = [=] { |
| 906 | if (const auto active = activeMediaView()) { |
| 907 | return active->videoThumbnailContent().isEmpty(); |
| 908 | } |
| 909 | return true; |
| 910 | }; |
| 911 | const auto done = [=](QByteArray result) { |
| 912 | if (const auto active = activeMediaView()) { |
| 913 | active->setVideoThumbnail(std::move(result)); |
| 914 | } |
| 915 | }; |
| 916 | Data::LoadCloudFile( |
| 917 | &session(), |
| 918 | _videoThumbnail, |
| 919 | origin, |
| 920 | LoadFromCloudOrLocal, |
| 921 | autoLoading, |
| 922 | Data::kAnimationCacheTag, |
| 923 | finalCheck, |
| 924 | done); |
| 925 | } |
| 926 | |
| 927 | const ImageLocation &DocumentData::videoThumbnailLocation() const { |
| 928 | return _videoThumbnail.location; |
no test coverage detected