mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: video page theme
mod: popscope related #459 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -70,11 +70,17 @@ class _ReplyPageState extends CommonPublishPageState<ReplyPage> {
|
||||
),
|
||||
);
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
themeData = darkVideoPage
|
||||
? MyApp.darkThemeData ?? Theme.of(context)
|
||||
: Theme.of(context);
|
||||
}
|
||||
|
||||
late final darkVideoPage =
|
||||
Get.currentRoute.startsWith('/video') && GStorage.darkVideoPage;
|
||||
late final ThemeData themeData = darkVideoPage
|
||||
? MyApp.darkThemeData ?? Theme.of(context)
|
||||
: Theme.of(context);
|
||||
late ThemeData themeData;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -503,6 +503,9 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
super.didChangeDependencies();
|
||||
VideoDetailPage.routeObserver
|
||||
.subscribe(this, ModalRoute.of(context)! as PageRoute);
|
||||
themeData = videoDetailController.plPlayerController.darkVideoPage
|
||||
? MyApp.darkThemeData ?? Theme.of(context)
|
||||
: Theme.of(context);
|
||||
}
|
||||
|
||||
// void _handleTransition(String name) {
|
||||
@@ -1131,10 +1134,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
return childWhenDisabled;
|
||||
}
|
||||
|
||||
late final ThemeData themeData =
|
||||
videoDetailController.plPlayerController.darkVideoPage
|
||||
? MyApp.darkThemeData ?? Theme.of(context)
|
||||
: Theme.of(context);
|
||||
late ThemeData themeData;
|
||||
|
||||
Widget get child {
|
||||
if (!horizontalScreen) {
|
||||
@@ -1345,7 +1345,9 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
}
|
||||
|
||||
Widget videoPlayer(double videoWidth, double videoHeight) => PopScope(
|
||||
canPop: !isFullScreen,
|
||||
canPop: !isFullScreen &&
|
||||
(horizontalScreen ||
|
||||
MediaQuery.of(context).orientation == Orientation.portrait),
|
||||
onPopInvokedWithResult: _onPopInvokedWithResult,
|
||||
child: Stack(
|
||||
children: [
|
||||
|
||||
@@ -542,6 +542,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
super.didChangeDependencies();
|
||||
VideoDetailPageV.routeObserver
|
||||
.subscribe(this, ModalRoute.of(context)! as PageRoute);
|
||||
themeData = videoDetailController.plPlayerController.darkVideoPage
|
||||
? MyApp.darkThemeData ?? Theme.of(context)
|
||||
: Theme.of(context);
|
||||
}
|
||||
|
||||
// void _handleTransition(String name) {
|
||||
@@ -1510,10 +1513,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
return childWhenDisabled;
|
||||
}
|
||||
|
||||
late final ThemeData themeData =
|
||||
videoDetailController.plPlayerController.darkVideoPage
|
||||
? MyApp.darkThemeData ?? Theme.of(context)
|
||||
: Theme.of(context);
|
||||
late ThemeData themeData;
|
||||
|
||||
Widget get child {
|
||||
if (!horizontalScreen) {
|
||||
@@ -1730,7 +1730,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
|
||||
Widget videoPlayer(double videoWidth, double videoHeight) {
|
||||
return PopScope(
|
||||
canPop: !isFullScreen,
|
||||
canPop: !isFullScreen &&
|
||||
(horizontalScreen ||
|
||||
MediaQuery.of(context).orientation == Orientation.portrait),
|
||||
onPopInvokedWithResult: _onPopInvokedWithResult,
|
||||
child: Stack(
|
||||
children: [
|
||||
|
||||
@@ -138,9 +138,15 @@ class _SendDanmakuPanelState extends CommonPublishPageState<SendDanmakuPanel> {
|
||||
),
|
||||
);
|
||||
|
||||
late final ThemeData themeData = widget.darkVideoPage
|
||||
? MyApp.darkThemeData ?? Theme.of(context)
|
||||
: Theme.of(context);
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
themeData = widget.darkVideoPage
|
||||
? MyApp.darkThemeData ?? Theme.of(context)
|
||||
: Theme.of(context);
|
||||
}
|
||||
|
||||
late ThemeData themeData;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
Reference in New Issue
Block a user