fix: 历史记录删除失败

This commit is contained in:
guozhigq
2023-10-08 22:44:49 +08:00
parent 4b3e791370
commit 77f47b8242

View File

@ -180,7 +180,11 @@ 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);
}