From 6bdc68708217e031bf6627b67f9e1edf8289d426 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Tue, 2 Jan 2024 23:26:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?mod:=20iOS=E7=AB=AF=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E8=87=AA=E5=8A=A8pip=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/setting/play_setting.dart | 60 +++++++++++++++++++---------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/lib/pages/setting/play_setting.dart b/lib/pages/setting/play_setting.dart index 4dd76a7a..bfd5db5f 100644 --- a/lib/pages/setting/play_setting.dart +++ b/lib/pages/setting/play_setting.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:hive/hive.dart'; @@ -95,12 +97,13 @@ class _PlaySettingState extends State { setKey: SettingBoxKey.enableBackgroundPlay, defaultVal: false, ), - const SetSwitchItem( - title: '自动PiP播放', - subTitle: '进入后台时画中画播放', - setKey: SettingBoxKey.autoPiP, - defaultVal: false, - ), + if (Platform.isAndroid) + const SetSwitchItem( + title: '自动PiP播放', + subTitle: '进入后台时画中画播放', + setKey: SettingBoxKey.autoPiP, + defaultVal: false, + ), const SetSwitchItem( title: '自动全屏', subTitle: '视频开始播放时进入全屏', @@ -154,9 +157,12 @@ class _PlaySettingState extends State { int? result = await showDialog( context: context, builder: (context) { - return SelectDialog(title: '默认画质', value: defaultVideoQa, values: VideoQuality.values.reversed.map((e) { - return {'title': e.description, 'value': e.code}; - }).toList()); + return SelectDialog( + title: '默认画质', + value: defaultVideoQa, + values: VideoQuality.values.reversed.map((e) { + return {'title': e.description, 'value': e.code}; + }).toList()); }, ); if (result != null) { @@ -177,9 +183,12 @@ class _PlaySettingState extends State { int? result = await showDialog( context: context, builder: (context) { - return SelectDialog(title: '默认音质', value: defaultAudioQa, values: AudioQuality.values.reversed.map((e) { - return {'title': e.description, 'value': e.code}; - }).toList()); + return SelectDialog( + title: '默认音质', + value: defaultAudioQa, + values: AudioQuality.values.reversed.map((e) { + return {'title': e.description, 'value': e.code}; + }).toList()); }, ); if (result != null) { @@ -200,9 +209,12 @@ class _PlaySettingState extends State { String? result = await showDialog( context: context, builder: (context) { - return SelectDialog(title: '默认解码格式', value: defaultDecode, values: VideoDecodeFormats.values.map((e) { - return {'title': e.description, 'value': e.code}; - }).toList()); + return SelectDialog( + title: '默认解码格式', + value: defaultDecode, + values: VideoDecodeFormats.values.map((e) { + return {'title': e.description, 'value': e.code}; + }).toList()); }, ); if (result != null) { @@ -223,9 +235,12 @@ class _PlaySettingState extends State { int? result = await showDialog( context: context, builder: (context) { - return SelectDialog(title: '默认全屏方式', value: defaultFullScreenMode, values: FullScreenMode.values.map((e) { - return {'title': e.description, 'value': e.code}; - }).toList()); + return SelectDialog( + title: '默认全屏方式', + value: defaultFullScreenMode, + values: FullScreenMode.values.map((e) { + return {'title': e.description, 'value': e.code}; + }).toList()); }, ); if (result != null) { @@ -246,9 +261,12 @@ class _PlaySettingState extends State { int? result = await showDialog( context: context, builder: (context) { - return SelectDialog(title: '底部进度条展示', value: defaultBtmProgressBehavior, values: BtmProgresBehavior.values.map((e) { - return {'title': e.description, 'value': e.code}; - }).toList()); + return SelectDialog( + title: '底部进度条展示', + value: defaultBtmProgressBehavior, + values: BtmProgresBehavior.values.map((e) { + return {'title': e.description, 'value': e.code}; + }).toList()); }, ); if (result != null) { From 65ab59fa3554fd962d0166aea1cc9f400ae97306 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Tue, 2 Jan 2024 23:34:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?mod:=20=E9=A6=96=E9=A1=B5web=E7=AB=AF?= =?UTF-8?q?=E6=8E=A8=E8=8D=90=E5=B1=95=E7=A4=BA=E3=80=90=E5=B7=B2=E5=85=B3?= =?UTF-8?q?=E6=B3=A8=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common/widgets/video_card_v.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/common/widgets/video_card_v.dart b/lib/common/widgets/video_card_v.dart index fa15a75c..5c827f84 100644 --- a/lib/common/widgets/video_card_v.dart +++ b/lib/common/widgets/video_card_v.dart @@ -266,6 +266,14 @@ class VideoContent extends StatelessWidget { fs: 9, ) ], + if (videoItem.isFollowed == 1) ...[ + const PBadge( + text: '已关注', + stack: 'normal', + size: 'small', + type: 'color', + ) + ], Expanded( flex: crossAxisCount == 1 ? 0 : 1, child: Text(