2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Use photo as video thumbnail in WebPageData.

This commit is contained in:
John Preston
2018-10-25 13:24:45 +04:00
parent 550b67236e
commit 4837117719
9 changed files with 87 additions and 7 deletions

View File

@@ -552,11 +552,15 @@ void DocumentData::validateGoodThumbnail() {
void DocumentData::refreshGoodThumbnail() {
if (_goodThumbnail && hasRemoteLocation()) {
_goodThumbnail->replaceSource(
std::make_unique<Data::GoodThumbSource>(this));
replaceGoodThumbnail(std::make_unique<Data::GoodThumbSource>(this));
}
}
void DocumentData::replaceGoodThumbnail(
std::unique_ptr<Images::Source> &&source) {
_goodThumbnail->replaceSource(std::move(source));
}
void DocumentData::setGoodThumbnail(QImage &&image, QByteArray &&bytes) {
Expects(uploadingData != nullptr);