mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-23 10:36:24 +08:00
@@ -41,9 +41,9 @@ class HistoryController
|
||||
}
|
||||
|
||||
@override
|
||||
void onSelect(int index, [bool disableSelect = true]) {
|
||||
void onSelect(HistoryItemModel item, [bool disableSelect = true]) {
|
||||
List<HistoryItemModel> list = loadingState.value.data!;
|
||||
list[index].checked = !(list[index].checked ?? false);
|
||||
item.checked = !(item.checked ?? false);
|
||||
baseCtr.checkedCount.value =
|
||||
list.where((item) => item.checked == true).length;
|
||||
loadingState.refresh();
|
||||
|
||||
@@ -273,7 +273,7 @@ class _HistoryPageState extends State<HistoryPage>
|
||||
return HistoryItem(
|
||||
item: item,
|
||||
ctr: _historyController.baseCtr,
|
||||
onChoose: () => _historyController.onSelect(index),
|
||||
onChoose: () => _historyController.onSelect(item),
|
||||
onDelete: (kid, business) =>
|
||||
_historyController.delHistory(item),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user