mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 15:35:51 +00:00
Use Data::DocumentMedia to store good thumbnails.
This commit is contained in:
@@ -237,15 +237,7 @@ bool WebPageData::applyChanges(
|
||||
}
|
||||
|
||||
void WebPageData::replaceDocumentGoodThumbnail() {
|
||||
if (!document || !photo || !document->goodThumbnail()) {
|
||||
return;
|
||||
if (document && photo) {
|
||||
document->setGoodThumbnailPhoto(photo);
|
||||
}
|
||||
const auto &location = photo->large()->location();
|
||||
if (location.valid()) {
|
||||
document->replaceGoodThumbnail(
|
||||
std::make_unique<Images::StorageSource>(
|
||||
location,
|
||||
photo->large()->bytesSize()));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user