diff --git a/lib/pages/danmaku/view.dart b/lib/pages/danmaku/view.dart index b256c2a30..fcbfc3a16 100644 --- a/lib/pages/danmaku/view.dart +++ b/lib/pages/danmaku/view.dart @@ -113,7 +113,10 @@ class _PlDanmakuState extends State { ? Colors.white : DmUtils.decimalToColor(e.color), type: DmUtils.getPosition(e.mode), - isColorful: e.colorful == DmColorfulType.VipGradualColor, + isColorful: playerController.showVipDanmaku && + e.colorful == DmColorfulType.VipGradualColor + ? true + : null, ), ); } diff --git a/lib/pages/setting/widgets/model.dart b/lib/pages/setting/widgets/model.dart index 90a589c24..3b2265377 100644 --- a/lib/pages/setting/widgets/model.dart +++ b/lib/pages/setting/widgets/model.dart @@ -1747,6 +1747,13 @@ List get extraSettings => [ } }, ), + SettingsModel( + settingsType: SettingsType.sw1tch, + title: '显示会员彩色弹幕', + leading: Icon(MdiIcons.gradientHorizontal), + setKey: SettingBoxKey.showVipDanmaku, + defaultVal: true, + ), SettingsModel( settingsType: SettingsType.sw1tch, enableFeedback: true, diff --git a/lib/plugin/pl_player/controller.dart b/lib/plugin/pl_player/controller.dart index 5c26adab3..c3eddd9ac 100644 --- a/lib/plugin/pl_player/controller.dart +++ b/lib/plugin/pl_player/controller.dart @@ -274,6 +274,7 @@ class PlPlayerController { late int subtitlePaddingH = GStorage.subtitlePaddingH; late int subtitlePaddingB = GStorage.subtitlePaddingB; late double subtitleBgOpaticy = GStorage.subtitleBgOpaticy; + late bool showVipDanmaku = GStorage.showVipDanmaku; // 播放顺序相关 PlayRepeat playRepeat = PlayRepeat.pause; diff --git a/lib/utils/storage.dart b/lib/utils/storage.dart index 5b2632c60..f6658cc86 100644 --- a/lib/utils/storage.dart +++ b/lib/utils/storage.dart @@ -336,6 +336,9 @@ class GStorage { static bool get savedRcmdTip => GStorage.setting.get(SettingBoxKey.savedRcmdTip, defaultValue: true); + static bool get showVipDanmaku => + GStorage.setting.get(SettingBoxKey.showVipDanmaku, defaultValue: true); + static List get dynamicDetailRatio => List.from(setting .get(SettingBoxKey.dynamicDetailRatio, defaultValue: [60.0, 40.0])); @@ -554,6 +557,7 @@ class SettingBoxKey { openInBrowser = 'openInBrowser', refreshDragPercentage = 'refreshDragPercentage', refreshDisplacement = 'refreshDisplacement', + showVipDanmaku = 'showVipDanmaku', // Sponsor Block enableSponsorBlock = 'enableSponsorBlock',