Skip to content

Commit

Permalink
Fix dragging of non-leader media.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed May 31, 2024
1 parent ba611d0 commit 0c1b487
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Telegram/SourceFiles/history/history_inner_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1749,12 +1749,13 @@ std::unique_ptr<QMimeData> HistoryInner::prepareDrag() {
forwardIds = getSelectedItems();
} else if (_mouseCursorState == CursorState::Date) {
forwardIds = session().data().itemOrItsGroup(_mouseActionItem);
} else if (pressedView->isHiddenByGroup() && pressedHandler) {
forwardIds = MessageIdsList(1, _mouseActionItem->fullId());
} else if (const auto media = pressedView->media()) {
if (media->dragItemByHandler(pressedHandler)) {
forwardIds = MessageIdsList(1, _mouseActionItem->fullId());
}
} else if ((pressedView->isHiddenByGroup() && pressedHandler)
|| (pressedView->media()
&& pressedView->media()->dragItemByHandler(pressedHandler))) {
const auto item = _dragStateItem
? _dragStateItem
: _mouseActionItem;
forwardIds = MessageIdsList(1, item->fullId());
}
if (forwardIds.empty()) {
return nullptr;
Expand Down

0 comments on commit 0c1b487

Please sign in to comment.