mod: 弹幕过滤规则与黑名单从Setting移至LocalCache

This commit is contained in:
orz12
2024-07-07 15:01:08 +08:00
parent e021e2bfef
commit 76cd85b9eb
7 changed files with 25 additions and 59 deletions

View File

@@ -19,7 +19,7 @@ class _DanmakuBlockPageState extends State<DanmakuBlockPage> {
final DanmakuBlockController _danmakuBlockController =
Get.put(DanmakuBlockController());
final ScrollController scrollController = ScrollController();
Box setting = GStorage.setting;
Box localCache = GStorage.localCache;
late PlPlayerController plPlayerController;
static const Map<int, String> ruleLabels = {
@@ -50,7 +50,7 @@ class _DanmakuBlockPageState extends State<DanmakuBlockPage> {
return e.toMap();
}).toList();
print("simpleRuleList:$simpleRuleList");
setting.put(SettingBoxKey.danmakuFilterRule, simpleRuleList);
localCache.put(LocalCacheKey.danmakuFilterRule, simpleRuleList);
plPlayerController.danmakuFilterRule.value = simpleRuleList;
scrollController.removeListener(() {});
scrollController.dispose();