mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-21 19:28:27 +08:00
add superChatType
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -874,7 +874,6 @@ List<SettingsModel> get extraSettings => [
|
||||
onTap: (context, setState) async {
|
||||
final result = await showDialog<double>(
|
||||
context: context,
|
||||
|
||||
builder: (context) {
|
||||
return SlideDialog(
|
||||
title: '连接重试次数',
|
||||
@@ -900,7 +899,6 @@ List<SettingsModel> get extraSettings => [
|
||||
onTap: (context, setState) async {
|
||||
final result = await showDialog<double>(
|
||||
context: context,
|
||||
|
||||
builder: (context) {
|
||||
return SlideDialog(
|
||||
title: '连接重试间隔',
|
||||
@@ -928,7 +926,6 @@ List<SettingsModel> get extraSettings => [
|
||||
onTap: (context, setState) async {
|
||||
final result = await showDialog<int>(
|
||||
context: context,
|
||||
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
title: '评论展示',
|
||||
@@ -953,7 +950,6 @@ List<SettingsModel> get extraSettings => [
|
||||
onTap: (context, setState) async {
|
||||
final result = await showDialog<int>(
|
||||
context: context,
|
||||
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
title: '动态展示',
|
||||
@@ -978,7 +974,6 @@ List<SettingsModel> get extraSettings => [
|
||||
onTap: (context, setState) async {
|
||||
final result = await showDialog<MemberTabType>(
|
||||
context: context,
|
||||
|
||||
builder: (context) {
|
||||
return SelectDialog<MemberTabType>(
|
||||
title: '用户页默认展示TAB',
|
||||
@@ -1194,7 +1189,6 @@ Future<void> audioNormalization(
|
||||
String param = '';
|
||||
await showDialog(
|
||||
context: context,
|
||||
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: const Text('自定义参数'),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:PiliPlus/common/widgets/custom_icon.dart';
|
||||
import 'package:PiliPlus/models/common/super_chat_type.dart';
|
||||
import 'package:PiliPlus/models/common/video/subtitle_pref_type.dart';
|
||||
import 'package:PiliPlus/pages/main/controller.dart';
|
||||
import 'package:PiliPlus/pages/setting/models/model.dart';
|
||||
@@ -157,11 +158,26 @@ List<SettingsModel> get playSettings => [
|
||||
setKey: SettingBoxKey.keyboardControl,
|
||||
defaultVal: true,
|
||||
),
|
||||
const SwitchModel(
|
||||
title: '显示 SuperChat (醒目留言)',
|
||||
leading: Icon(Icons.live_tv),
|
||||
setKey: SettingBoxKey.showSuperChat,
|
||||
defaultVal: true,
|
||||
NormalModel(
|
||||
title: 'SuperChat (醒目留言) 显示类型',
|
||||
leading: const Icon(Icons.live_tv),
|
||||
getSubtitle: () => '当前:「${Pref.superChatType.title}」',
|
||||
onTap: (context, setState) async {
|
||||
final result = await showDialog<SuperChatType>(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return SelectDialog<SuperChatType>(
|
||||
title: 'SuperChat (醒目留言) 显示类型',
|
||||
value: Pref.superChatType,
|
||||
values: SuperChatType.values.map((e) => (e, e.title)).toList(),
|
||||
);
|
||||
},
|
||||
);
|
||||
if (result != null) {
|
||||
await GStorage.setting.put(SettingBoxKey.superChatType, result.index);
|
||||
setState();
|
||||
}
|
||||
},
|
||||
),
|
||||
const SwitchModel(
|
||||
title: '竖屏扩大展示',
|
||||
|
||||
Reference in New Issue
Block a user