mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: 新增设置:横屏时返回可以直接返回为横屏页面,无需经过竖屏
This commit is contained in:
@@ -57,6 +57,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
// 自动退出全屏
|
||||
late bool autoExitFullcreen;
|
||||
late bool autoPlayEnable;
|
||||
late bool exitFullscreenAutoVertical;
|
||||
late bool autoPiP;
|
||||
final Floating floating = Floating();
|
||||
// 生命周期监听
|
||||
@@ -85,6 +86,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
statusBarHeight = localCache.get('statusBarHeight');
|
||||
autoExitFullcreen =
|
||||
setting.get(SettingBoxKey.enableAutoExit, defaultValue: false);
|
||||
exitFullscreenAutoVertical = setting
|
||||
.get(SettingBoxKey.exitFullscreenAutoVertical, defaultValue: true);
|
||||
autoPlayEnable =
|
||||
setting.get(SettingBoxKey.autoPlayEnable, defaultValue: true);
|
||||
autoPiP = setting.get(SettingBoxKey.autoPiP, defaultValue: false);
|
||||
@@ -345,7 +348,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
.triggerFullScreen(status: false);
|
||||
}
|
||||
if (MediaQuery.of(context).orientation ==
|
||||
Orientation.landscape) {
|
||||
Orientation.landscape &&
|
||||
exitFullscreenAutoVertical) {
|
||||
verticalScreen();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1069,7 +1069,9 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
else
|
||||
<void>{
|
||||
if (MediaQuery.of(context).orientation ==
|
||||
Orientation.landscape)
|
||||
Orientation.landscape &&
|
||||
setting.get(SettingBoxKey.exitFullscreenAutoVertical,
|
||||
defaultValue: true))
|
||||
{
|
||||
SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.portraitUp,
|
||||
|
||||
Reference in New Issue
Block a user