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: '使用可折叠的播放页面',
|
title: '使用可折叠的播放页面',
|
||||||
leading: Icon(Icons.video_settings),
|
leading: Icon(Icons.video_settings),
|
||||||
setKey: SettingBoxKey.collapsibleVideoPage,
|
setKey: SettingBoxKey.collapsibleVideoPage,
|
||||||
defaultVal: false,
|
defaultVal: true,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
GStorage.collapsibleVideoPage = value;
|
GStorage.collapsibleVideoPage = value;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
StreamSubscription? _listenerDetail;
|
StreamSubscription? _listenerDetail;
|
||||||
StreamSubscription? _listenerLoadingState;
|
StreamSubscription? _listenerLoadingState;
|
||||||
StreamSubscription? _listenerCid;
|
StreamSubscription? _listenerCid;
|
||||||
|
StreamSubscription? _listenerFS;
|
||||||
|
|
||||||
Box get setting => GStorage.setting;
|
Box get setting => GStorage.setting;
|
||||||
|
|
||||||
@@ -199,6 +200,15 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
|
|
||||||
videoDetailController.animationController.addListener(animListener);
|
videoDetailController.animationController.addListener(animListener);
|
||||||
|
|
||||||
|
if (removeSafeArea) {
|
||||||
|
_listenerFS =
|
||||||
|
videoDetailController.plPlayerController.isFullScreen.listen((value) {
|
||||||
|
if (videoDetailController.direction.value == 'vertical') {
|
||||||
|
refreshPage();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
WidgetsBinding.instance.addObserver(this);
|
WidgetsBinding.instance.addObserver(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -374,6 +384,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
_listenerDetail?.cancel();
|
_listenerDetail?.cancel();
|
||||||
_listenerLoadingState?.cancel();
|
_listenerLoadingState?.cancel();
|
||||||
_listenerCid?.cancel();
|
_listenerCid?.cancel();
|
||||||
|
_listenerFS?.cancel();
|
||||||
|
|
||||||
videoDetailController.skipTimer?.cancel();
|
videoDetailController.skipTimer?.cancel();
|
||||||
videoDetailController.skipTimer = null;
|
videoDetailController.skipTimer = null;
|
||||||
@@ -691,6 +702,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
(BuildContext context, bool innerBoxIsScrolled) {
|
(BuildContext context, bool innerBoxIsScrolled) {
|
||||||
return [
|
return [
|
||||||
SliverAppBar(
|
SliverAppBar(
|
||||||
|
primary: false,
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
pinned: true,
|
pinned: true,
|
||||||
expandedHeight: isFullScreen ||
|
expandedHeight: isFullScreen ||
|
||||||
@@ -723,14 +735,6 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
showStatusBar();
|
showStatusBar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (removeSafeArea &&
|
|
||||||
isFullScreen &&
|
|
||||||
videoDetailController.direction.value ==
|
|
||||||
'vertical') {
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
refreshPage();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return Container(
|
return Container(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
// showStatusBarBackgroundColor ? null : Colors.black,
|
// showStatusBarBackgroundColor ? null : Colors.black,
|
||||||
@@ -742,7 +746,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
Orientation.landscape ||
|
Orientation.landscape ||
|
||||||
removeSafeArea
|
removeSafeArea
|
||||||
? 0
|
? 0
|
||||||
: MediaQuery.of(context).padding.top)
|
: MediaQuery.of(this.context)
|
||||||
|
.padding
|
||||||
|
.top)
|
||||||
: videoDetailController.isExpanding ||
|
: videoDetailController.isExpanding ||
|
||||||
videoDetailController.isCollapsing
|
videoDetailController.isCollapsing
|
||||||
? animHeight
|
? animHeight
|
||||||
|
|||||||
Reference in New Issue
Block a user