fix return button not working (#1883)

* fix: return button won't work #1

* feat: return horizontal | isPortrait

* revert: e85ccc7 onPopInvokedWithResult isPortrait

* revert: e85ccc7

* remove unused param

---------

Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
HCha
2026-04-08 20:40:26 +08:00
committed by GitHub
parent 6341660788
commit de6e402d97
4 changed files with 5 additions and 12 deletions

View File

@@ -346,8 +346,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
}
return popScope(
canPop: !isFullScreen && !plPlayerController.isDesktopPip,
onPopInvokedWithResult: (didPop, result) =>
plPlayerController.onPopInvokedWithResult(didPop, result, isPortrait),
onPopInvokedWithResult: plPlayerController.onPopInvokedWithResult,
child: player,
);
}

View File

@@ -2121,7 +2121,6 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
videoDetailController.plPlayerController.onPopInvokedWithResult(
didPop,
result,
isPortrait,
);
}

View File

@@ -1756,11 +1756,8 @@ class HeaderControlState extends State<HeaderControl>
size: 15,
color: Colors.white,
),
onPressed: () => plPlayerController.onPopInvokedWithResult(
false,
null,
videoDetailCtr.isPortrait,
),
onPressed: () =>
plPlayerController.onPopInvokedWithResult(false, null),
),
),
if (!plPlayerController.isDesktopPip &&

View File

@@ -1746,7 +1746,7 @@ class PlPlayerController with BlockConfigMixin {
});
}
void onPopInvokedWithResult(bool didPop, Object? result, bool isPortrait) {
void onPopInvokedWithResult(bool didPop, Object? result) {
if (didPop) {
if (Platform.isAndroid) {
_disableAutoEnterPipIfNeeded();
@@ -1765,8 +1765,6 @@ class PlPlayerController with BlockConfigMixin {
triggerFullScreen(status: false);
return;
}
if (!horizontalScreen && !isPortrait) {
Get.back();
}
Get.back();
}
}