mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: custom expand intro panel
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -229,6 +229,12 @@ class _ExtraSettingState extends State<ExtraSetting> {
|
|||||||
setKey: SettingBoxKey.showRelatedVideo,
|
setKey: SettingBoxKey.showRelatedVideo,
|
||||||
defaultVal: true,
|
defaultVal: true,
|
||||||
),
|
),
|
||||||
|
SetSwitchItem(
|
||||||
|
title: '默认展开视频简介',
|
||||||
|
leading: Icon(Icons.expand_more),
|
||||||
|
setKey: SettingBoxKey.exapndIntroPanel,
|
||||||
|
defaultVal: false,
|
||||||
|
),
|
||||||
Obx(
|
Obx(
|
||||||
() => ListTile(
|
() => ListTile(
|
||||||
enableFeedback: true,
|
enableFeedback: true,
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
|
|
||||||
late final _coinKey = GlobalKey<ActionItemState>();
|
late final _coinKey = GlobalKey<ActionItemState>();
|
||||||
late final _favKey = GlobalKey<ActionItemState>();
|
late final _favKey = GlobalKey<ActionItemState>();
|
||||||
final _expandableCtr = ExpandableController(initialExpanded: false);
|
late final ExpandableController _expandableCtr;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -170,6 +170,10 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
|
|
||||||
loadingStatus = widget.loadingStatus;
|
loadingStatus = widget.loadingStatus;
|
||||||
enableAi = setting.get(SettingBoxKey.enableAi, defaultValue: true);
|
enableAi = setting.get(SettingBoxKey.enableAi, defaultValue: true);
|
||||||
|
|
||||||
|
_expandableCtr = ExpandableController(
|
||||||
|
initialExpanded: GStorage.exapndIntroPanel,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -116,6 +116,15 @@ class GStorage {
|
|||||||
static bool get showRelatedVideo =>
|
static bool get showRelatedVideo =>
|
||||||
setting.get(SettingBoxKey.showRelatedVideo, defaultValue: true);
|
setting.get(SettingBoxKey.showRelatedVideo, defaultValue: true);
|
||||||
|
|
||||||
|
static bool get showVideoReply =>
|
||||||
|
setting.get(SettingBoxKey.showVideoReply, defaultValue: true);
|
||||||
|
|
||||||
|
static bool get showBangumiReply =>
|
||||||
|
setting.get(SettingBoxKey.showBangumiReply, defaultValue: true);
|
||||||
|
|
||||||
|
static bool get exapndIntroPanel =>
|
||||||
|
setting.get(SettingBoxKey.exapndIntroPanel, defaultValue: false);
|
||||||
|
|
||||||
static List<double> get dynamicDetailRatio =>
|
static List<double> get dynamicDetailRatio =>
|
||||||
setting.get(SettingBoxKey.dynamicDetailRatio, defaultValue: [60.0, 40.0]);
|
setting.get(SettingBoxKey.dynamicDetailRatio, defaultValue: [60.0, 40.0]);
|
||||||
|
|
||||||
@@ -310,6 +319,9 @@ class SettingBoxKey {
|
|||||||
grpcReply = 'grpcReply',
|
grpcReply = 'grpcReply',
|
||||||
showViewPoints = 'showViewPoints',
|
showViewPoints = 'showViewPoints',
|
||||||
showRelatedVideo = 'showRelatedVideo',
|
showRelatedVideo = 'showRelatedVideo',
|
||||||
|
showVideoReply = 'showVideoReply',
|
||||||
|
showBangumiReply = 'showBangumiReply',
|
||||||
|
exapndIntroPanel = 'exapndIntroPanel',
|
||||||
|
|
||||||
// Sponsor Block
|
// Sponsor Block
|
||||||
enableSponsorBlock = 'enableSponsorBlock',
|
enableSponsorBlock = 'enableSponsorBlock',
|
||||||
|
|||||||
Reference in New Issue
Block a user