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 6e9c1ce commit 84b7d6c
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 now = hasSelectedItems() || !_dragSelected.empty();
const auto now = hasSelectedItems()
|| !_dragSelected.empty()
|| (_mouseAction == MouseAction::Selecting);
if (_lastInSelectionMode != now) {
_lastInSelectionMode = now;
if (_inSelectionModeAnimation.animating()) {
Expand Down

0 comments on commit 84b7d6c

Please sign in to comment.