opt handle data

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-29 21:11:57 +08:00
parent c9450992d9
commit 9a63e23478
24 changed files with 147 additions and 116 deletions

View File

@@ -46,8 +46,9 @@ class DanmakuBlockController extends GetxController
var result = await DanmakuFilterHttp.danmakuFilterDel(ids: id);
SmartDialog.dismiss();
if (result['status']) {
ruleTypes[type]!.remove(id);
ruleTypes.refresh();
ruleTypes
..[type]!.remove(id)
..refresh();
}
SmartDialog.showToast(result['msg']);
}
@@ -60,8 +61,9 @@ class DanmakuBlockController extends GetxController
SmartDialog.dismiss();
if (result['status']) {
SimpleRule rule = result['data'];
ruleTypes[type]![rule.id] = rule.filter;
ruleTypes.refresh();
ruleTypes
..[type]![rule.id] = rule.filter
..refresh();
SmartDialog.showToast('添加成功');
} else {
SmartDialog.showToast(result['msg']);