Skip to content

Commit

Permalink
Slightly eased conditions for selection mode to avoid shaky animations.
Browse files Browse the repository at this point in the history
  • Loading branch information
23rd committed Oct 12, 2024
1 parent d7ceafc commit 03a2c2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions Telegram/SourceFiles/history/history_inner_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3655,9 +3655,7 @@ HistoryView::SelectionModeResult HistoryInner::inSelectionMode() const {
const auto inSelectionMode = [&] {
if (hasSelectedItems()) {
return true;
} else if (_mouseAction == MouseAction::Selecting
&& _dragSelFrom
&& _dragSelTo) {
} else if (_mouseAction == MouseAction::Selecting) {
return true;
} else if (_chooseForReportReason.has_value()) {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,9 @@ bool ListWidget::hasSelectedItems() const {
}

SelectionModeResult ListWidget::inSelectionMode() const {
const auto inSelectionMode = hasSelectedItems() || !_dragSelected.empty();
const auto inSelectionMode = hasSelectedItems()
|| !_dragSelected.empty()
|| (_mouseAction == MouseAction::Selecting);
const auto was = _lastInSelectionMode;
const auto now = inSelectionMode;
if (_lastInSelectionMode != now) {
Expand Down

0 comments on commit 03a2c2a

Please sign in to comment.