diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index 76e02ec631..37d840515b 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -2368,7 +2368,9 @@ void Message::clickHandlerPressedChanged( ; badge && badge->tagLink && handler == badge->tagLink) { toggleBadgeRipple(pressed); } else if (displayFromName() && handler == fromLink()) { - startLinkRipple(); + if (_fromLinkRipplePointSet || !pressed) { + startLinkRipple(); + } } else if (const auto via = data()->Get() ; via && (handler == via->link) @@ -2792,6 +2794,8 @@ bool Message::hasFromPhoto() const { TextState Message::textState( QPoint point, StateRequest request) const { + _fromLinkRipplePointSet = 0; + const auto item = data(); const auto media = this->media(); @@ -3154,6 +3158,7 @@ bool Message::getStateFromName( && point.x() < availableLeft + nameText->maxWidth()) { outResult->link = fromLink(); recordLinkRipplePoint(point, trect.topLeft()); + _fromLinkRipplePointSet = 1; return true; } auto via = item->Get(); diff --git a/Telegram/SourceFiles/history/view/history_view_message.h b/Telegram/SourceFiles/history/view/history_view_message.h index 24ba34a0cb..09c8c3ad52 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.h +++ b/Telegram/SourceFiles/history/view/history_view_message.h @@ -393,10 +393,11 @@ private: mutable int _fromNameVersion = 0; mutable int _bubbleTextualWidthMinimum : 16 = -1; mutable int _bubbleTextualWidthCache : 16 = 0; - uint32 _bubbleWidthLimit : 27 = 0; + uint32 _bubbleWidthLimit : 26 = 0; uint32 _invertMedia : 1 = 0; uint32 _hideReply : 1 = 0; uint32 _postShowingAuthor : 1 = 0; + mutable uint32 _fromLinkRipplePointSet : 1 = 0; BottomInfo _bottomInfo; mutable QPoint _lastMediaPosition;