mod: default values

This commit is contained in:
bggRGjQaUbCoE
2024-08-27 14:00:49 +08:00
parent 4c201af21a
commit 493400a615
16 changed files with 28 additions and 29 deletions

View File

@@ -116,7 +116,7 @@ class VideoDetailController extends GetxController
tabCtr = TabController(
length: 2, vsync: this, initialIndex: defaultShowComment ? 1 : 0);
autoPlay.value =
setting.get(SettingBoxKey.autoPlayEnable, defaultValue: true);
setting.get(SettingBoxKey.autoPlayEnable, defaultValue: false);
if (autoPlay.value) isShowCover.value = false;
enableHA.value = setting.get(SettingBoxKey.enableHA, defaultValue: true);
hwdec.value = setting.get(SettingBoxKey.hardwareDecoding,

View File

@@ -106,7 +106,7 @@ class VideoIntroController extends GetxController {
userLogin = userInfo != null;
lastPlayCid.value = int.parse(Get.parameters['cid']!);
isShowOnlineTotal =
setting.get(SettingBoxKey.enableOnlineTotal, defaultValue: false);
setting.get(SettingBoxKey.enableOnlineTotal, defaultValue: true);
if (isShowOnlineTotal) {
queryOnlineTotal();
startTimer(); // 在页面加载时启动定时器

View File

@@ -41,7 +41,7 @@ class VideoReplyController extends GetxController {
void onInit() {
super.onInit();
int defaultReplySortIndex =
setting.get(SettingBoxKey.replySortType, defaultValue: 0) as int;
setting.get(SettingBoxKey.replySortType, defaultValue: 1) as int;
if (defaultReplySortIndex == 2) {
setting.put(SettingBoxKey.replySortType, 0);
defaultReplySortIndex = 0;

View File

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

View File

@@ -400,7 +400,7 @@ class _HeaderControlState extends State<HeaderControl> {
Clipboard.setData(
ClipboardData(
text:
"rate\n${player.state.rate}",
"rate\n${player.state.rate}",
),
);
}),
@@ -1548,7 +1548,7 @@ class _HeaderControlState extends State<HeaderControl> {
() => IconButton(
tooltip: "${_.isOpenDanmu.value ? '关闭' : '开启'}弹幕",
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.zero),
padding: WidgetStateProperty.all(EdgeInsets.zero),
),
onPressed: () {
_.isOpenDanmu.value = !_.isOpenDanmu.value;
@@ -1575,7 +1575,7 @@ class _HeaderControlState extends State<HeaderControl> {
child: IconButton(
tooltip: '画中画',
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.zero),
padding: WidgetStateProperty.all(EdgeInsets.zero),
),
onPressed: () async {
bool canUsePiP = widget.floating != null &&
@@ -1584,7 +1584,7 @@ class _HeaderControlState extends State<HeaderControl> {
if (canUsePiP) {
bool enableBackgroundPlay = setting.get(
SettingBoxKey.enableBackgroundPlay,
defaultValue: true);
defaultValue: false);
if (!enableBackgroundPlay) {
// SmartDialog.showToast('建议开启【后台播放】功能\n避免画中画没有暂停按钮');
// await Future.delayed(const Duration(seconds: 2), () {