From d44349d612a681a7cc75d3036613b6491854b0d7 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 10 Oct 2025 21:57:17 +0400 Subject: [PATCH] Fix possible crash on Linux. --- .../dialogs/ui/dialogs_top_bar_suggestion_content.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/dialogs/ui/dialogs_top_bar_suggestion_content.cpp b/Telegram/SourceFiles/dialogs/ui/dialogs_top_bar_suggestion_content.cpp index 6e53d71a0d..f536b3bb93 100644 --- a/Telegram/SourceFiles/dialogs/ui/dialogs_top_bar_suggestion_content.cpp +++ b/Telegram/SourceFiles/dialogs/ui/dialogs_top_bar_suggestion_content.cpp @@ -320,11 +320,7 @@ rpl::producer TopBarSuggestionContent::desiredHeightValue() const { const auto desiredHeight = lastTop + (lastLines * _contentTextSt.font->height) + bottomPadding; - const auto minHeight = desiredHeight; - return std::clamp( - desiredHeight, - minHeight, - st::sponsoredMessageBarMaxHeight); + return std::min(desiredHeight, st::sponsoredMessageBarMaxHeight); }); }