mod: update def options

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-11-29 18:45:21 +08:00
parent 203906d9f1
commit bc1e6b059b
7 changed files with 9 additions and 11 deletions

View File

@@ -131,7 +131,7 @@ class _BangumiPanelState extends State<BangumiPanel> {
child: Text( child: Text(
widget.newEp?['desc']?.contains('连载') == true widget.newEp?['desc']?.contains('连载') == true
? '连载中,更新至${Utils.isStringNumeric(widget.newEp['title']) ? '${widget.newEp?['title']}' : '${widget.newEp?['title']}'}' ? '连载中,更新至${Utils.isStringNumeric(widget.newEp['title']) ? '${widget.newEp?['title']}' : '${widget.newEp?['title']}'}'
: '${widget.pages.length}', : widget.newEp?['desc'],
style: const TextStyle(fontSize: 13), style: const TextStyle(fontSize: 13),
), ),
), ),

View File

@@ -51,9 +51,7 @@ class _FansPageState extends State<FansPage> {
Widget _buildBody(LoadingState loadingState) { Widget _buildBody(LoadingState loadingState) {
return switch (loadingState) { return switch (loadingState) {
Loading() => HttpError( Loading() => HttpError(),
callback: _fansController.onReload,
),
Success() => (loadingState.response as List?)?.isNotEmpty == true Success() => (loadingState.response as List?)?.isNotEmpty == true
? SliverGrid( ? SliverGrid(
gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent( gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(

View File

@@ -162,7 +162,7 @@ class _PlaySettingState extends State<PlaySetting> {
callFn: (val) { callFn: (val) {
if (val && if (val &&
!setting.get(SettingBoxKey.enableBackgroundPlay, !setting.get(SettingBoxKey.enableBackgroundPlay,
defaultValue: false)) { defaultValue: true)) {
SmartDialog.showToast('建议开启后台音频服务'); SmartDialog.showToast('建议开启后台音频服务');
} }
}), }),
@@ -172,7 +172,7 @@ class _PlaySettingState extends State<PlaySetting> {
subTitle: '当弹幕开关开启时,小窗屏蔽弹幕以获得较好的体验', subTitle: '当弹幕开关开启时,小窗屏蔽弹幕以获得较好的体验',
leading: Icon(Icons.comments_disabled_outlined), leading: Icon(Icons.comments_disabled_outlined),
setKey: SettingBoxKey.pipNoDanmaku, setKey: SettingBoxKey.pipNoDanmaku,
defaultVal: true, defaultVal: false,
), ),
const SetSwitchItem( const SetSwitchItem(
title: '全屏手势反向', title: '全屏手势反向',
@@ -247,7 +247,7 @@ class _PlaySettingState extends State<PlaySetting> {
subTitle: '避免画中画没有播放暂停功能', subTitle: '避免画中画没有播放暂停功能',
leading: Icon(Icons.volume_up_outlined), leading: Icon(Icons.volume_up_outlined),
setKey: SettingBoxKey.enableBackgroundPlay, setKey: SettingBoxKey.enableBackgroundPlay,
defaultVal: false, defaultVal: true,
), ),
], ],
), ),

View File

@@ -133,7 +133,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
autoPlayEnable = autoPlayEnable =
setting.get(SettingBoxKey.autoPlayEnable, defaultValue: false); setting.get(SettingBoxKey.autoPlayEnable, defaultValue: false);
autoPiP = setting.get(SettingBoxKey.autoPiP, defaultValue: false); autoPiP = setting.get(SettingBoxKey.autoPiP, defaultValue: false);
pipNoDanmaku = setting.get(SettingBoxKey.pipNoDanmaku, defaultValue: true); pipNoDanmaku = setting.get(SettingBoxKey.pipNoDanmaku, defaultValue: false);
enableVerticalExpand = enableVerticalExpand =
setting.get(SettingBoxKey.enableVerticalExpand, defaultValue: false); setting.get(SettingBoxKey.enableVerticalExpand, defaultValue: false);
removeSafeArea = setting.get(SettingBoxKey.videoPlayerRemoveSafeArea, removeSafeArea = setting.get(SettingBoxKey.videoPlayerRemoveSafeArea,

View File

@@ -1598,7 +1598,7 @@ class _HeaderControlState extends State<HeaderControl> {
if (canUsePiP) { if (canUsePiP) {
bool enableBackgroundPlay = setting.get( bool enableBackgroundPlay = setting.get(
SettingBoxKey.enableBackgroundPlay, SettingBoxKey.enableBackgroundPlay,
defaultValue: false); defaultValue: true);
if (!enableBackgroundPlay && context.mounted) { if (!enableBackgroundPlay && context.mounted) {
// SmartDialog.showToast('建议开启【后台播放】功能\n避免画中画没有暂停按钮'); // SmartDialog.showToast('建议开启【后台播放】功能\n避免画中画没有暂停按钮');
// await Future.delayed(const Duration(seconds: 2), () { // await Future.delayed(const Duration(seconds: 2), () {

View File

@@ -34,7 +34,7 @@ class VideoPlayerServiceHandler extends BaseAudioHandler with SeekHandler {
revalidateSetting() { revalidateSetting() {
enableBackgroundPlay = enableBackgroundPlay =
setting.get(SettingBoxKey.enableBackgroundPlay, defaultValue: false); setting.get(SettingBoxKey.enableBackgroundPlay, defaultValue: true);
} }
@override @override

View File

@@ -274,7 +274,7 @@ class SettingBoxKey {
previewQuality = 'previewQuality', previewQuality = 'previewQuality',
checkDynamic = 'checkDynamic', checkDynamic = 'checkDynamic',
dynamicPeriod = 'dynamicPeriod', dynamicPeriod = 'dynamicPeriod',
schemeVariant = 'schemeVariant', schemeVariant = 'schemeVariaznt',
// Sponsor Block // Sponsor Block
enableSponsorBlock = 'enableSponsorBlock', enableSponsorBlock = 'enableSponsorBlock',