Fix a std::clamp assertion

This commit is contained in:
Ilya Fedin 2024-03-01 10:26:05 +04:00 committed by John Preston
parent ec427ad45d
commit a8b5061003

View file

@ -232,7 +232,7 @@ QSize Photo::countCurrentSize(int newWidth) {
const auto thumbMaxWidth = qMin(newWidth, st::maxMediaSize); const auto thumbMaxWidth = qMin(newWidth, st::maxMediaSize);
const auto minWidth = std::clamp( const auto minWidth = std::clamp(
_parent->minWidthForMedia(), _parent->minWidthForMedia(),
(_parent->hasBubble() qMin(thumbMaxWidth, _parent->hasBubble()
? st::historyPhotoBubbleMinWidth ? st::historyPhotoBubbleMinWidth
: st::minPhotoSize), : st::minPhotoSize),
thumbMaxWidth); thumbMaxWidth);