Don't shrink non-photo media.

This commit is contained in:
John Preston 2023-10-29 07:54:39 +04:00
parent 04f040c9c5
commit 94ac9f93fa
2 changed files with 4 additions and 1 deletions

View File

@ -254,6 +254,9 @@ bool WebPageData::applyChanges(
}
return QString();
}();
if (newDocument || !newCollage.items.empty() || !newPhoto) {
newHasLargeMedia = false;
}
if (type == newType
&& url == resultUrl

View File

@ -242,7 +242,7 @@ QSize WebPage::countOptimalSize() {
using Flag = MediaWebPageFlag;
if (_data->hasLargeMedia && (_flags & Flag::ForceLargeMedia)) {
_asArticle = 0;
} else if (_data->photo && (_flags & Flag::ForceSmallMedia)) {
} else if (_data->hasLargeMedia && (_flags & Flag::ForceSmallMedia)) {
_asArticle = 1;
} else {
_asArticle = _data->computeDefaultSmallMedia();