From d219bccf2b74436b351fe5f4c672685fab43b25d Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 29 May 2024 04:24:47 +0300 Subject: [PATCH] Fixed position of via bot header above reply in message view. --- .../history/view/history_view_message.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index b860c2c58..ddcd5e279 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -1301,8 +1301,8 @@ void Message::draw(Painter &p, const PaintContext &context) const { paintFromName(p, trect, context); paintTopicButton(p, trect, context); paintForwardedInfo(p, trect, context); - paintReplyInfo(p, trect, context); paintViaBotIdInfo(p, trect, context); + paintReplyInfo(p, trect, context); } if (entry) { trect.setHeight(trect.height() - entry->height()); @@ -4147,17 +4147,17 @@ QRect Message::innerGeometry() const { + st::topicButtonPadding.bottom() + st::topicButtonSkip); } - // Skip displayForwardedFrom() until there are no animations for it. - if (const auto reply = Get()) { - // See paintReplyInfo(). - result.translate(0, reply->height()); - } if (!displayFromName() && !displayForwardedFrom()) { // See paintViaBotIdInfo(). if (data()->Has()) { result.translate(0, st::msgServiceNameFont->height); } } + // Skip displayForwardedFrom() until there are no animations for it. + if (const auto reply = Get()) { + // See paintReplyInfo(). + result.translate(0, reply->height()); + } } return result; }