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 =
|
late final darkVideoPage =
|
||||||
Get.currentRoute.startsWith('/video') && GStorage.darkVideoPage;
|
Get.currentRoute.startsWith('/video') && GStorage.darkVideoPage;
|
||||||
late final ThemeData themeData = darkVideoPage
|
late ThemeData themeData;
|
||||||
? MyApp.darkThemeData ?? Theme.of(context)
|
|
||||||
: Theme.of(context);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|||||||
@@ -503,6 +503,9 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
super.didChangeDependencies();
|
super.didChangeDependencies();
|
||||||
VideoDetailPage.routeObserver
|
VideoDetailPage.routeObserver
|
||||||
.subscribe(this, ModalRoute.of(context)! as PageRoute);
|
.subscribe(this, ModalRoute.of(context)! as PageRoute);
|
||||||
|
themeData = videoDetailController.plPlayerController.darkVideoPage
|
||||||
|
? MyApp.darkThemeData ?? Theme.of(context)
|
||||||
|
: Theme.of(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
// void _handleTransition(String name) {
|
// void _handleTransition(String name) {
|
||||||
@@ -1131,10 +1134,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
return childWhenDisabled;
|
return childWhenDisabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
late final ThemeData themeData =
|
late ThemeData themeData;
|
||||||
videoDetailController.plPlayerController.darkVideoPage
|
|
||||||
? MyApp.darkThemeData ?? Theme.of(context)
|
|
||||||
: Theme.of(context);
|
|
||||||
|
|
||||||
Widget get child {
|
Widget get child {
|
||||||
if (!horizontalScreen) {
|
if (!horizontalScreen) {
|
||||||
@@ -1345,7 +1345,9 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget videoPlayer(double videoWidth, double videoHeight) => PopScope(
|
Widget videoPlayer(double videoWidth, double videoHeight) => PopScope(
|
||||||
canPop: !isFullScreen,
|
canPop: !isFullScreen &&
|
||||||
|
(horizontalScreen ||
|
||||||
|
MediaQuery.of(context).orientation == Orientation.portrait),
|
||||||
onPopInvokedWithResult: _onPopInvokedWithResult,
|
onPopInvokedWithResult: _onPopInvokedWithResult,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -542,6 +542,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
super.didChangeDependencies();
|
super.didChangeDependencies();
|
||||||
VideoDetailPageV.routeObserver
|
VideoDetailPageV.routeObserver
|
||||||
.subscribe(this, ModalRoute.of(context)! as PageRoute);
|
.subscribe(this, ModalRoute.of(context)! as PageRoute);
|
||||||
|
themeData = videoDetailController.plPlayerController.darkVideoPage
|
||||||
|
? MyApp.darkThemeData ?? Theme.of(context)
|
||||||
|
: Theme.of(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
// void _handleTransition(String name) {
|
// void _handleTransition(String name) {
|
||||||
@@ -1510,10 +1513,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
return childWhenDisabled;
|
return childWhenDisabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
late final ThemeData themeData =
|
late ThemeData themeData;
|
||||||
videoDetailController.plPlayerController.darkVideoPage
|
|
||||||
? MyApp.darkThemeData ?? Theme.of(context)
|
|
||||||
: Theme.of(context);
|
|
||||||
|
|
||||||
Widget get child {
|
Widget get child {
|
||||||
if (!horizontalScreen) {
|
if (!horizontalScreen) {
|
||||||
@@ -1730,7 +1730,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
|
|
||||||
Widget videoPlayer(double videoWidth, double videoHeight) {
|
Widget videoPlayer(double videoWidth, double videoHeight) {
|
||||||
return PopScope(
|
return PopScope(
|
||||||
canPop: !isFullScreen,
|
canPop: !isFullScreen &&
|
||||||
|
(horizontalScreen ||
|
||||||
|
MediaQuery.of(context).orientation == Orientation.portrait),
|
||||||
onPopInvokedWithResult: _onPopInvokedWithResult,
|
onPopInvokedWithResult: _onPopInvokedWithResult,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -138,9 +138,15 @@ class _SendDanmakuPanelState extends CommonPublishPageState<SendDanmakuPanel> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
late final ThemeData themeData = widget.darkVideoPage
|
@override
|
||||||
? MyApp.darkThemeData ?? Theme.of(context)
|
void didChangeDependencies() {
|
||||||
: Theme.of(context);
|
super.didChangeDependencies();
|
||||||
|
themeData = widget.darkVideoPage
|
||||||
|
? MyApp.darkThemeData ?? Theme.of(context)
|
||||||
|
: Theme.of(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
late ThemeData themeData;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|||||||
Reference in New Issue
Block a user