Ignored drag action on reply links in unwrapped media.

This commit is contained in:
23rd 2023-08-15 10:13:26 +03:00
parent 9bf5f992a3
commit fd6e135700
2 changed files with 7 additions and 3 deletions

View File

@ -519,6 +519,12 @@ bool UnwrappedMedia::hasTextForCopy() const {
return _content->hasTextForCopy(); return _content->hasTextForCopy();
} }
bool UnwrappedMedia::dragItemByHandler(
const ClickHandlerPtr &p) const {
const auto reply = _parent->displayedReply();
return !(reply && (reply->replyToLink() == p));
}
QRect UnwrappedMedia::contentRectForReactions() const { QRect UnwrappedMedia::contentRectForReactions() const {
const auto inWebPage = (_parent->media() != this); const auto inWebPage = (_parent->media() != this);
if (inWebPage) { if (inWebPage) {

View File

@ -73,9 +73,7 @@ public:
bool toggleSelectionByHandlerClick(const ClickHandlerPtr &p) const override { bool toggleSelectionByHandlerClick(const ClickHandlerPtr &p) const override {
return true; return true;
} }
bool dragItemByHandler(const ClickHandlerPtr &p) const override { bool dragItemByHandler(const ClickHandlerPtr &p) const override;
return true;
}
DocumentData *getDocument() const override { DocumentData *getDocument() const override {
return _content->document(); return _content->document();