From b66c61573f46168679c469f08c6d92d7510079d7 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 27 Jun 2025 21:09:02 +0400 Subject: [PATCH] Make counter-suggestions link originals. --- Telegram/SourceFiles/history/view/history_view_element.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/view/history_view_element.cpp b/Telegram/SourceFiles/history/view/history_view_element.cpp index 0b09c36dca..aa3f0950b8 100644 --- a/Telegram/SourceFiles/history/view/history_view_element.cpp +++ b/Telegram/SourceFiles/history/view/history_view_element.cpp @@ -710,7 +710,10 @@ ClickHandlerPtr ServicePreMessage::textState( const StateRequest &request, QRect g) const { if (media && media->hideServiceText()) { - return {}; + const auto left = (width - media->width()) / 2; + const auto top = g.top() - height - st::msgMargin.bottom(); + const auto position = QPoint(left, top); + return media->textState(point - position, request).link; } const auto top = g.top() - height - st::msgMargin.top(); const auto rect = QRect(0, top, width, height)