mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-13 03:28:03 +00:00
desktop file transfer shift + click multi selection
This commit is contained in:
@@ -555,50 +555,3 @@ class BottomSheetBody extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class SelectedItems {
|
||||
bool? _isLocal;
|
||||
final List<Entry> _items = [];
|
||||
|
||||
List<Entry> get items => _items;
|
||||
|
||||
int get length => _items.length;
|
||||
|
||||
bool? get isLocal => _isLocal;
|
||||
|
||||
add(bool isLocal, Entry e) {
|
||||
if (_isLocal == null) {
|
||||
_isLocal = isLocal;
|
||||
}
|
||||
if (_isLocal != null && _isLocal != isLocal) {
|
||||
return;
|
||||
}
|
||||
if (!_items.contains(e)) {
|
||||
_items.add(e);
|
||||
}
|
||||
}
|
||||
|
||||
bool contains(Entry e) {
|
||||
return _items.contains(e);
|
||||
}
|
||||
|
||||
remove(Entry e) {
|
||||
_items.remove(e);
|
||||
if (_items.length == 0) {
|
||||
_isLocal = null;
|
||||
}
|
||||
}
|
||||
|
||||
bool isOtherPage(bool currentIsLocal) {
|
||||
if (_isLocal == null) {
|
||||
return false;
|
||||
} else {
|
||||
return _isLocal != currentIsLocal;
|
||||
}
|
||||
}
|
||||
|
||||
clear() {
|
||||
_items.clear();
|
||||
_isLocal = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user