mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-22 01:56:47 +08:00
revert: toSet (#941)
This commit is contained in:
committed by
GitHub
parent
80a4c8c24d
commit
9f33488248
@@ -72,12 +72,12 @@ mixin CommonMultiSelectMixin<T extends MultiSelectData>
|
||||
|
||||
mixin DeleteItemMixin<R, T extends MultiSelectData>
|
||||
on CommonListController<R, T>, CommonMultiSelectMixin<T> {
|
||||
Future<void> afterDelete(Iterable<T> removeList) async {
|
||||
Future<void> afterDelete(Set<T> removeList) async {
|
||||
final list = loadingState.value.data!;
|
||||
if (removeList.length == list.length) {
|
||||
list.clear();
|
||||
} else if (removeList.length == 1) {
|
||||
list.remove(removeList.single);
|
||||
list.remove(removeList.first);
|
||||
} else {
|
||||
list.removeWhere(removeList.contains);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user