Skip to content

Commit

Permalink
remove shift & tap enable multiselect (rustdesk#9625)
Browse files Browse the repository at this point in the history
Signed-off-by: 21pages <[email protected]>
  • Loading branch information
21pages authored Oct 11, 2024
1 parent cde7620 commit 29b01e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flutter/lib/common/widgets/peer_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class _PeerCardState extends State<_PeerCard>
final PeerTabModel peerTabModel = Provider.of(context);
final peer = super.widget.peer;
return GestureDetector(
onDoubleTap: peerTabModel.multiSelectionMode || peerTabModel.isShiftDown
onDoubleTap: peerTabModel.multiSelectionMode
? null
: () => widget.connect(context, peer.id),
onTap: () {
Expand Down
2 changes: 1 addition & 1 deletion flutter/lib/models/peer_tab_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class PeerTabModel with ChangeNotifier {
// https://github.com/flutter/flutter/issues/101275#issuecomment-1604541700
// After onTap, the shift key should be pressed for a while when not in multiselection mode,
// because onTap is delayed when onDoubleTap is not null
if ((isDesktop || isWebDesktop) && !_isShiftDown) return;
if (isDesktop || isWebDesktop) return;
_multiSelectionMode = true;
}
final cached = _currentTabCachedPeers.map((e) => e.id).toList();
Expand Down

0 comments on commit 29b01e9

Please sign in to comment.