mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 04:00:28 +08:00
opt handle res
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user