diff --git a/lib/pages/setting/view.dart b/lib/pages/setting/view.dart index 5afb25bc..4ecf7f98 100644 --- a/lib/pages/setting/view.dart +++ b/lib/pages/setting/view.dart @@ -126,6 +126,7 @@ class _SettingPageState extends State { child: MediaQuery.removePadding( context: context, removeRight: true, + removeTop: true, child: _buildList, ), ), @@ -138,6 +139,7 @@ class _SettingPageState extends State { child: MediaQuery.removePadding( context: context, removeLeft: true, + removeTop: true, child: switch (_type) { 'privacySetting' => PrivacySetting(showAppBar: false), 'recommendSetting' => RecommendSetting(showAppBar: false), diff --git a/lib/pages/video/detail/controller.dart b/lib/pages/video/detail/controller.dart index 9112e593..da26b39e 100644 --- a/lib/pages/video/detail/controller.dart +++ b/lib/pages/video/detail/controller.dart @@ -423,7 +423,7 @@ class VideoDetailController extends GetxController } : null, ); - if (plPlayerController.isFullScreen.value) { + if (plPlayerController.isFullScreen.value || showVideoSheet) { PageUtils.showVideoBottomSheet( context, child: plPlayerController.darkVideoPage && MyApp.darkThemeData != null @@ -445,6 +445,11 @@ class VideoDetailController extends GetxController } } + bool horizontalScreen = + GStorage.setting.get(SettingBoxKey.horizontalScreen, defaultValue: false); + bool get showVideoSheet => + !horizontalScreen && Get.context!.orientation == Orientation.landscape; + int? _lastPos; double? _blockLimit; List>? _blockSettings; @@ -1356,7 +1361,7 @@ class VideoDetailController extends GetxController ), ); } - if (plPlayerController.isFullScreen.value) { + if (plPlayerController.isFullScreen.value || showVideoSheet) { PageUtils.showVideoBottomSheet( context, child: plPlayerController.darkVideoPage && MyApp.darkThemeData != null @@ -1649,7 +1654,7 @@ class VideoDetailController extends GetxController title = Get.find(tag: heroTag).videoDetail.value.title; } catch (_) {} - if (plPlayerController.isFullScreen.value) { + if (plPlayerController.isFullScreen.value || showVideoSheet) { PageUtils.showVideoBottomSheet( context, child: plPlayerController.darkVideoPage && MyApp.darkThemeData != null diff --git a/lib/pages/video/detail/view_v.dart b/lib/pages/video/detail/view_v.dart index e6c0252c..63bdbfd8 100644 --- a/lib/pages/video/detail/view_v.dart +++ b/lib/pages/video/detail/view_v.dart @@ -78,7 +78,6 @@ class _VideoDetailPageVState extends State // 自动退出全屏 late bool autoExitFullscreen; late bool autoPlayEnable; - late bool horizontalScreen; late bool enableVerticalExpand; late bool autoPiP; late bool pipNoDanmaku; @@ -151,8 +150,6 @@ class _VideoDetailPageVState extends State } autoExitFullscreen = setting.get(SettingBoxKey.enableAutoExit, defaultValue: true); - horizontalScreen = - setting.get(SettingBoxKey.horizontalScreen, defaultValue: false); autoPlayEnable = setting.get(SettingBoxKey.autoPlayEnable, defaultValue: false); autoPiP = setting.get(SettingBoxKey.autoPiP, defaultValue: false); @@ -359,7 +356,7 @@ class _VideoDetailPageVState extends State videoIntroController.canelTimer(); videoIntroController.videoDetail.close(); videoDetailController.cid.close(); - if (!horizontalScreen) { + if (!videoDetailController.horizontalScreen) { AutoOrientation.portraitUpMode(); } shutdownTimerService.handleWaitingFinished(); @@ -648,7 +645,7 @@ class _VideoDetailPageVState extends State final double videoWidth = context.width; if (MediaQuery.of(context).orientation == Orientation.landscape && - !horizontalScreen && + !videoDetailController.horizontalScreen && !isFullScreen && isShowing && mounted) { @@ -1454,7 +1451,7 @@ class _VideoDetailPageVState extends State late ThemeData themeData; Widget get child { - if (!horizontalScreen) { + if (!videoDetailController.horizontalScreen) { return autoChoose(childWhenDisabled); } @@ -1633,7 +1630,7 @@ class _VideoDetailPageVState extends State Widget videoPlayer(double videoWidth, double videoHeight) { return PopScope( canPop: !isFullScreen && - (horizontalScreen || + (videoDetailController.horizontalScreen || MediaQuery.of(context).orientation == Orientation.portrait), onPopInvokedWithResult: _onPopInvokedWithResult, child: Stack( @@ -2143,7 +2140,7 @@ class _VideoDetailPageVState extends State ); }, ); - if (isFullScreen) { + if (isFullScreen || videoDetailController.showVideoSheet) { PageUtils.showVideoBottomSheet( context, isFullScreen: () => isFullScreen, @@ -2241,7 +2238,7 @@ class _VideoDetailPageVState extends State } void showViewPoints() { - if (isFullScreen) { + if (isFullScreen || videoDetailController.showVideoSheet) { PageUtils.showVideoBottomSheet( context, isFullScreen: () => isFullScreen, @@ -2280,7 +2277,7 @@ class _VideoDetailPageVState extends State plPlayerController!.triggerFullScreen(status: false); } if (MediaQuery.of(context).orientation == Orientation.landscape && - !horizontalScreen) { + !videoDetailController.horizontalScreen) { verticalScreenForTwoSeconds(); } }