mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -2105,7 +2105,7 @@ List<SettingsModel> get extraSettings => [
|
||||
title: '使用可折叠的播放页面',
|
||||
leading: Icon(Icons.video_settings),
|
||||
setKey: SettingBoxKey.collapsibleVideoPage,
|
||||
defaultVal: false,
|
||||
defaultVal: true,
|
||||
onChanged: (value) {
|
||||
GStorage.collapsibleVideoPage = value;
|
||||
},
|
||||
|
||||
@@ -107,6 +107,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
StreamSubscription? _listenerDetail;
|
||||
StreamSubscription? _listenerLoadingState;
|
||||
StreamSubscription? _listenerCid;
|
||||
StreamSubscription? _listenerFS;
|
||||
|
||||
Box get setting => GStorage.setting;
|
||||
|
||||
@@ -199,6 +200,15 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
|
||||
videoDetailController.animationController.addListener(animListener);
|
||||
|
||||
if (removeSafeArea) {
|
||||
_listenerFS =
|
||||
videoDetailController.plPlayerController.isFullScreen.listen((value) {
|
||||
if (videoDetailController.direction.value == 'vertical') {
|
||||
refreshPage();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
}
|
||||
|
||||
@@ -374,6 +384,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
_listenerDetail?.cancel();
|
||||
_listenerLoadingState?.cancel();
|
||||
_listenerCid?.cancel();
|
||||
_listenerFS?.cancel();
|
||||
|
||||
videoDetailController.skipTimer?.cancel();
|
||||
videoDetailController.skipTimer = null;
|
||||
@@ -691,6 +702,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
(BuildContext context, bool innerBoxIsScrolled) {
|
||||
return [
|
||||
SliverAppBar(
|
||||
primary: false,
|
||||
automaticallyImplyLeading: false,
|
||||
pinned: true,
|
||||
expandedHeight: isFullScreen ||
|
||||
@@ -723,14 +735,6 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
showStatusBar();
|
||||
}
|
||||
}
|
||||
if (removeSafeArea &&
|
||||
isFullScreen &&
|
||||
videoDetailController.direction.value ==
|
||||
'vertical') {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
refreshPage();
|
||||
});
|
||||
}
|
||||
return Container(
|
||||
color: Colors.black,
|
||||
// showStatusBarBackgroundColor ? null : Colors.black,
|
||||
@@ -742,7 +746,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
Orientation.landscape ||
|
||||
removeSafeArea
|
||||
? 0
|
||||
: MediaQuery.of(context).padding.top)
|
||||
: MediaQuery.of(this.context)
|
||||
.padding
|
||||
.top)
|
||||
: videoDetailController.isExpanding ||
|
||||
videoDetailController.isCollapsing
|
||||
? animHeight
|
||||
|
||||
Reference in New Issue
Block a user