diff --git a/Telegram/SourceFiles/history/view/media/history_view_media_unwrapped.cpp b/Telegram/SourceFiles/history/view/media/history_view_media_unwrapped.cpp index 3348a1855..4ff49e604 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_media_unwrapped.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_media_unwrapped.cpp @@ -519,6 +519,12 @@ bool UnwrappedMedia::hasTextForCopy() const { return _content->hasTextForCopy(); } +bool UnwrappedMedia::dragItemByHandler( + const ClickHandlerPtr &p) const { + const auto reply = _parent->displayedReply(); + return !(reply && (reply->replyToLink() == p)); +} + QRect UnwrappedMedia::contentRectForReactions() const { const auto inWebPage = (_parent->media() != this); if (inWebPage) { diff --git a/Telegram/SourceFiles/history/view/media/history_view_media_unwrapped.h b/Telegram/SourceFiles/history/view/media/history_view_media_unwrapped.h index 8b03a801d..ca80a80c1 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_media_unwrapped.h +++ b/Telegram/SourceFiles/history/view/media/history_view_media_unwrapped.h @@ -73,9 +73,7 @@ public: bool toggleSelectionByHandlerClick(const ClickHandlerPtr &p) const override { return true; } - bool dragItemByHandler(const ClickHandlerPtr &p) const override { - return true; - } + bool dragItemByHandler(const ClickHandlerPtr &p) const override; DocumentData *getDocument() const override { return _content->document();