mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Select messages by timestamp clicks.
This commit is contained in:
@@ -2217,6 +2217,15 @@ void HistoryInner::mouseActionFinish(
|
||||
_selected.emplace(_dragStateItem, FullSelection);
|
||||
repaintItem(_mouseActionItem);
|
||||
}
|
||||
} else if (_mouseCursorState == CursorState::Date
|
||||
&& !hasSelectRestriction()
|
||||
&& _dragStateItem->isRegular()
|
||||
&& !_dragStateItem->isService()) {
|
||||
changeSelectionAsGroup(
|
||||
&_selected,
|
||||
_dragStateItem,
|
||||
SelectAction::Select);
|
||||
repaintItem(_mouseActionItem);
|
||||
} else {
|
||||
_selected.clear();
|
||||
update();
|
||||
|
||||
@@ -3713,6 +3713,20 @@ void ListWidget::mouseActionFinish(
|
||||
}
|
||||
} else if (needTextSelectionClear) {
|
||||
clearTextSelection();
|
||||
} else if (simpleSelectionChange
|
||||
&& _mouseCursorState == CursorState::Date
|
||||
&& !hasSelectRestriction()) {
|
||||
if (const auto item = session().data().message(pressState.itemId)) {
|
||||
if (_delegate->listIsItemGoodForSelection(item)) {
|
||||
clearTextSelection();
|
||||
changeSelectionAsGroup(
|
||||
_selected,
|
||||
item,
|
||||
SelectAction::Select);
|
||||
pushSelectedItems();
|
||||
update();
|
||||
}
|
||||
}
|
||||
} else if (_mouseAction == MouseAction::Selecting) {
|
||||
if (!_dragSelected.empty()) {
|
||||
applyDragSelection();
|
||||
|
||||
Reference in New Issue
Block a user