From 6e77126a650812ad7a35b2a435f14aa86e0920ee Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 1 Jul 2025 12:29:00 +0400 Subject: [PATCH] Fix task completion date tooltip. --- .../SourceFiles/history/history_inner_widget.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index c5e7a82f6c..95e86c7318 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -4899,21 +4899,26 @@ QString HistoryInner::tooltipText() const { if (const auto view = Element::Hovered()) { return HistoryView::DateTooltipText(view); } - } else if (_mouseCursorState == CursorState::Forwarded + } + if (_mouseCursorState == CursorState::Forwarded && _mouseAction == MouseAction::None) { if (const auto view = Element::Moused()) { if (const auto forwarded = view->data()->Get()) { return forwarded->text.toString(); } } - } else if (const auto lnk = ClickHandler::getActive()) { + } + if (const auto lnk = ClickHandler::getActive()) { using namespace HistoryView::Reactions; const auto count = ReactionCountOfLink(_dragStateItem, lnk); if (count.count && count.shortened) { return Lang::FormatCountDecimal(count.count); } - return lnk->tooltip(); - } else if (const auto view = Element::Moused()) { + if (const auto text = lnk->tooltip(); !text.isEmpty()) { + return text; + } + } + if (const auto view = Element::Moused()) { StateRequest request; const auto local = mapFromGlobal(_mousePosition); const auto point = _widget->clampMousePosition(local);