opt: delete history

This commit is contained in:
bggRGjQaUbCoE
2024-10-13 21:30:39 +08:00
parent 861c2a3471
commit f701ce1236

View File

@@ -141,7 +141,13 @@ class HistoryController extends GetxController {
// 删除已看历史记录
void onDelHistory() {
_onDelete(historyList.where((e) => e.progress == -1).toList());
List<HisListItem> list =
historyList.where((e) => e.progress == -1).toList();
if (list.isNotEmpty) {
_onDelete(list);
} else {
SmartDialog.showToast('无已看记录');
}
}
void _onDelete(List<HisListItem> result) async {