Skip to content

Commit d44349d

Browse files
committed
Fix possible crash on Linux.
1 parent 53919be commit d44349d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Telegram/SourceFiles/dialogs/ui/dialogs_top_bar_suggestion_content.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,11 +320,7 @@ rpl::producer<int> TopBarSuggestionContent::desiredHeightValue() const {
320320
const auto desiredHeight = lastTop
321321
+ (lastLines * _contentTextSt.font->height)
322322
+ bottomPadding;
323-
const auto minHeight = desiredHeight;
324-
return std::clamp(
325-
desiredHeight,
326-
minHeight,
327-
st::sponsoredMessageBarMaxHeight);
323+
return std::min(desiredHeight, st::sponsoredMessageBarMaxHeight);
328324
});
329325
}
330326

0 commit comments

Comments
 (0)