mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: expand intro panel
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -244,7 +244,13 @@ class _ExtraSettingState extends State<ExtraSetting> {
|
||||
SetSwitchItem(
|
||||
title: '默认展开视频简介',
|
||||
leading: Icon(Icons.expand_more),
|
||||
setKey: SettingBoxKey.exapndIntroPanel,
|
||||
setKey: SettingBoxKey.alwaysExapndIntroPanel,
|
||||
defaultVal: false,
|
||||
),
|
||||
SetSwitchItem(
|
||||
title: '横屏自动展开视频简介',
|
||||
leading: Icon(Icons.expand_more),
|
||||
setKey: SettingBoxKey.exapndIntroPanelH,
|
||||
defaultVal: false,
|
||||
),
|
||||
Obx(
|
||||
|
||||
@@ -171,15 +171,16 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
loadingStatus = widget.loadingStatus;
|
||||
enableAi = setting.get(SettingBoxKey.enableAi, defaultValue: true);
|
||||
|
||||
bool exapndIntroPanel = GStorage.exapndIntroPanel;
|
||||
bool alwaysExapndIntroPanel = GStorage.alwaysExapndIntroPanel;
|
||||
|
||||
_expandableCtr = ExpandableController(
|
||||
initialExpanded: exapndIntroPanel,
|
||||
initialExpanded: alwaysExapndIntroPanel,
|
||||
);
|
||||
|
||||
if (exapndIntroPanel.not) {
|
||||
if (alwaysExapndIntroPanel.not && GStorage.exapndIntroPanelH) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (context.orientation == Orientation.landscape) {
|
||||
if (context.orientation == Orientation.landscape &&
|
||||
_expandableCtr.expanded.not) {
|
||||
_expandableCtr.toggle();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user