mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: sponsor block
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -12,6 +12,7 @@ import 'package:PiliPalaX/models/model_owner.dart';
|
||||
import 'package:PiliPalaX/models/search/hot.dart';
|
||||
import 'package:PiliPalaX/models/user/info.dart';
|
||||
import 'global_data.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
class GStorage {
|
||||
static late final Box<dynamic> userInfo;
|
||||
@@ -49,6 +50,16 @@ class GStorage {
|
||||
static double get blockLimit =>
|
||||
setting.get(SettingBoxKey.blockLimit, defaultValue: 0.0);
|
||||
|
||||
static String get blockUserID {
|
||||
String blockUserID =
|
||||
setting.get(SettingBoxKey.blockUserID, defaultValue: '');
|
||||
if (blockUserID.isEmpty) {
|
||||
blockUserID = Uuid().v4().replaceAll('-', '');
|
||||
setting.put(SettingBoxKey.blockUserID, blockUserID);
|
||||
}
|
||||
return blockUserID;
|
||||
}
|
||||
|
||||
static ThemeMode get themeMode {
|
||||
switch (setting.get(SettingBoxKey.themeMode,
|
||||
defaultValue: ThemeType.system.code)) {
|
||||
@@ -225,6 +236,7 @@ class SettingBoxKey {
|
||||
blockSettings = 'blockSettings',
|
||||
blockLimit = 'blockLimit',
|
||||
blockColor = 'blockColor',
|
||||
blockUserID = 'blockUserID',
|
||||
|
||||
// 弹幕相关设置 权重(云屏蔽) 屏蔽类型 显示区域 透明度 字体大小 弹幕时间 描边粗细 字体粗细
|
||||
danmakuWeight = 'danmakuWeight',
|
||||
|
||||
Reference in New Issue
Block a user