mod: 历史记录删除逻辑

This commit is contained in:
guozhigq
2023-10-08 22:43:44 +08:00
parent b1a9152a49
commit 80e10aeaad
3 changed files with 11 additions and 2 deletions

View File

@ -180,12 +180,17 @@ class HistoryController extends GetxController {
List<HisListItem> result =
historyList.where((e) => e.checked!).toList();
for (HisListItem i in result) {
String resKid = 'archive_${i.kid}';
String str = 'archive';
try {
str = i.history!.business!;
} catch (_) {}
String resKid = '${str}_${i.kid}';
await UserHttp.delHistory(resKid);
historyList.removeWhere((e) => e.kid == i.kid);
}
checkedCount.value = 0;
SmartDialog.dismiss();
enableMultiple.value = false;
},
child: const Text('确认'),
)