mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Don't shrink non-photo media.
This commit is contained in:
parent
04f040c9c5
commit
94ac9f93fa
2 changed files with 4 additions and 1 deletions
|
@ -254,6 +254,9 @@ bool WebPageData::applyChanges(
|
||||||
}
|
}
|
||||||
return QString();
|
return QString();
|
||||||
}();
|
}();
|
||||||
|
if (newDocument || !newCollage.items.empty() || !newPhoto) {
|
||||||
|
newHasLargeMedia = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (type == newType
|
if (type == newType
|
||||||
&& url == resultUrl
|
&& url == resultUrl
|
||||||
|
|
|
@ -242,7 +242,7 @@ QSize WebPage::countOptimalSize() {
|
||||||
using Flag = MediaWebPageFlag;
|
using Flag = MediaWebPageFlag;
|
||||||
if (_data->hasLargeMedia && (_flags & Flag::ForceLargeMedia)) {
|
if (_data->hasLargeMedia && (_flags & Flag::ForceLargeMedia)) {
|
||||||
_asArticle = 0;
|
_asArticle = 0;
|
||||||
} else if (_data->photo && (_flags & Flag::ForceSmallMedia)) {
|
} else if (_data->hasLargeMedia && (_flags & Flag::ForceSmallMedia)) {
|
||||||
_asArticle = 1;
|
_asArticle = 1;
|
||||||
} else {
|
} else {
|
||||||
_asArticle = _data->computeDefaultSmallMedia();
|
_asArticle = _data->computeDefaultSmallMedia();
|
||||||
|
|
Loading…
Add table
Reference in a new issue