2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

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 minWidth = std::clamp(
_parent->minWidthForMedia(),
(_parent->hasBubble()
qMin(thumbMaxWidth, _parent->hasBubble()
? st::historyPhotoBubbleMinWidth
: st::minPhotoSize),
thumbMaxWidth);