opt handle res

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-29 17:17:35 +08:00
parent b643cb1bd0
commit 924d51d41b
198 changed files with 3715 additions and 2001 deletions

View File

@@ -26,14 +26,16 @@ class DanmakuBlockController extends GetxController
var result = await DanmakuFilterHttp.danmakuFilter();
SmartDialog.dismiss();
if (result['status']) {
if (result['data']?.rule != null) {
final List<SimpleRule> filter = result['data']?.rule;
for (var rule in filter) {
DanmakuBlockDataModel data = result['data'];
if (data.rule?.isNotEmpty == true) {
for (var rule in data.rule!) {
ruleTypes[rule.type]![rule.id] = rule.filter;
}
ruleTypes.refresh();
}
SmartDialog.showToast(result['data'].toast);
if (data.toast != null) {
SmartDialog.showToast(data.toast!);
}
} else {
SmartDialog.showToast(result['msg']);
}