From 9bc48f4aba32a96c83a63c0892b98fcfbac22140 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 16 Feb 2022 11:03:39 +0300 Subject: [PATCH] Fixed links position of inline keyboard when reactions aren't in bubble. --- Telegram/SourceFiles/history/view/history_view_message.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index 19a6071a1..7b4de0b50 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -1588,7 +1588,12 @@ TextState Message::textState( } if (keyboard && item->isHistoryEntry()) { - auto keyboardTop = g.top() + g.height() + st::msgBotKbButton.margin; + const auto keyboardTop = g.top() + + g.height() + + st::msgBotKbButton.margin + + ((_reactions && !reactionsInBubble) + ? (st::mediaInBubbleSkip + _reactions->height()) + : 0); if (QRect(g.left(), keyboardTop, g.width(), keyboardHeight).contains(point)) { result.link = keyboard->getLink(point - QPoint(g.left(), keyboardTop)); return result;