mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Load photo thumbnail only if no inline thumbnail found.
This commit is contained in:
parent
3d85ca2f84
commit
aa46ec8bc1
1 changed files with 4 additions and 3 deletions
|
@ -109,7 +109,8 @@ void Photo::ensureDataMediaCreated() const {
|
|||
void Photo::dataMediaCreated() const {
|
||||
Expects(_dataMedia != nullptr);
|
||||
|
||||
if (!_dataMedia->image(PhotoSize::Large)
|
||||
if (_data->inlineThumbnailBytes().isEmpty()
|
||||
&& !_dataMedia->image(PhotoSize::Large)
|
||||
&& !_dataMedia->image(PhotoSize::Thumbnail)) {
|
||||
_dataMedia->wanted(PhotoSize::Small, _realParent->fullId());
|
||||
}
|
||||
|
@ -376,10 +377,10 @@ void Photo::paintUserpicFrame(
|
|||
if (const auto large = _dataMedia->image(PhotoSize::Large)) {
|
||||
return large->pixCircled(_pixw, _pixh);
|
||||
} else if (const auto thumbnail = _dataMedia->image(
|
||||
PhotoSize::Thumbnail)) {
|
||||
PhotoSize::Thumbnail)) {
|
||||
return thumbnail->pixBlurredCircled(_pixw, _pixh);
|
||||
} else if (const auto small = _dataMedia->image(
|
||||
PhotoSize::Small)) {
|
||||
PhotoSize::Small)) {
|
||||
return small->pixBlurredCircled(_pixw, _pixh);
|
||||
} else if (const auto blurred = _dataMedia->thumbnailInline()) {
|
||||
return blurred->pixBlurredCircled(_pixw, _pixh);
|
||||
|
|
Loading…
Add table
Reference in a new issue