mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-06 01:57:45 +08:00
feat: tempPlayerConf add playRepeat (#1830)
This commit is contained in:
committed by
GitHub
parent
7e570d11d8
commit
0460030a2b
@@ -579,7 +579,7 @@ class _AudioPageState extends State<AudioPage> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
playMode.desc,
|
||||
playMode.label,
|
||||
style: TextStyle(fontSize: 13, color: color),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -89,10 +89,9 @@ List<SettingsModel> get extraSettings => [
|
||||
leading: const Icon(MdiIcons.debugStepOver),
|
||||
value: () => Pref.pgcSkipType,
|
||||
items: SkipType.values,
|
||||
onSelected: (value, setState) async {
|
||||
await GStorage.setting.put(SettingBoxKey.pgcSkipType, value.index);
|
||||
setState();
|
||||
},
|
||||
onSelected: (value, setState) => GStorage.setting
|
||||
.put(SettingBoxKey.pgcSkipType, value.index)
|
||||
.whenComplete(setState),
|
||||
),
|
||||
SwitchModel(
|
||||
title: '检查未读动态',
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:PiliPlus/pages/setting/models/model.dart';
|
||||
import 'package:PiliPlus/pages/setting/widgets/select_dialog.dart';
|
||||
import 'package:PiliPlus/plugin/pl_player/models/bottom_progress_behavior.dart';
|
||||
import 'package:PiliPlus/plugin/pl_player/models/fullscreen_mode.dart';
|
||||
import 'package:PiliPlus/plugin/pl_player/models/play_repeat.dart';
|
||||
import 'package:PiliPlus/plugin/pl_player/utils/fullscreen.dart'
|
||||
show allowRotateScreen;
|
||||
import 'package:PiliPlus/services/service_locator.dart';
|
||||
@@ -252,6 +253,15 @@ List<SettingsModel> get playSettings => [
|
||||
onChanged: (value) =>
|
||||
videoPlayerServiceHandler!.enableBackgroundPlay = value,
|
||||
),
|
||||
PopupModel(
|
||||
title: '播放顺序',
|
||||
leading: const Icon(Icons.repeat),
|
||||
value: () => Pref.playRepeat,
|
||||
items: PlayRepeat.values,
|
||||
onSelected: (value, setState) => GStorage.video
|
||||
.put(VideoBoxKey.playRepeat, value.index)
|
||||
.whenComplete(setState),
|
||||
),
|
||||
const SwitchModel(
|
||||
title: '播放器设置仅对当前生效',
|
||||
subtitle: '弹幕、字幕及部分设置中没有的设置除外',
|
||||
|
||||
@@ -60,7 +60,7 @@ class _PopupListTileState<T> extends State<PopupListTile<T>> {
|
||||
position: RelativeRect.fromLTRB(dx, offset.dy + 5, dx, 0),
|
||||
items: widget.itemBuilder(context),
|
||||
initialValue: value,
|
||||
requestFocus: true,
|
||||
requestFocus: false,
|
||||
).then<void>((T? newValue) {
|
||||
if (!mounted) {
|
||||
return;
|
||||
|
||||
@@ -624,7 +624,7 @@ class HeaderControlState extends State<HeaderControl>
|
||||
leading: const Icon(Icons.repeat, size: 20),
|
||||
title: const Text('播放顺序', style: titleStyle),
|
||||
subtitle: Text(
|
||||
plPlayerController.playRepeat.desc,
|
||||
plPlayerController.playRepeat.label,
|
||||
style: subTitleStyle,
|
||||
),
|
||||
),
|
||||
@@ -1695,7 +1695,7 @@ class HeaderControlState extends State<HeaderControl>
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 20,
|
||||
),
|
||||
title: Text(i.desc),
|
||||
title: Text(i.label),
|
||||
trailing: plPlayerController.playRepeat == i
|
||||
? Icon(
|
||||
Icons.done,
|
||||
|
||||
Reference in New Issue
Block a user