mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
fix return button not working (#1883)
* fix: return button won't work #1 * feat: return horizontal | isPortrait * revert:e85ccc7onPopInvokedWithResult isPortrait * revert:e85ccc7* remove unused param --------- Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -346,8 +346,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
}
|
}
|
||||||
return popScope(
|
return popScope(
|
||||||
canPop: !isFullScreen && !plPlayerController.isDesktopPip,
|
canPop: !isFullScreen && !plPlayerController.isDesktopPip,
|
||||||
onPopInvokedWithResult: (didPop, result) =>
|
onPopInvokedWithResult: plPlayerController.onPopInvokedWithResult,
|
||||||
plPlayerController.onPopInvokedWithResult(didPop, result, isPortrait),
|
|
||||||
child: player,
|
child: player,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2121,7 +2121,6 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
videoDetailController.plPlayerController.onPopInvokedWithResult(
|
videoDetailController.plPlayerController.onPopInvokedWithResult(
|
||||||
didPop,
|
didPop,
|
||||||
result,
|
result,
|
||||||
isPortrait,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1756,11 +1756,8 @@ class HeaderControlState extends State<HeaderControl>
|
|||||||
size: 15,
|
size: 15,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
onPressed: () => plPlayerController.onPopInvokedWithResult(
|
onPressed: () =>
|
||||||
false,
|
plPlayerController.onPopInvokedWithResult(false, null),
|
||||||
null,
|
|
||||||
videoDetailCtr.isPortrait,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (!plPlayerController.isDesktopPip &&
|
if (!plPlayerController.isDesktopPip &&
|
||||||
|
|||||||
@@ -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 (didPop) {
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid) {
|
||||||
_disableAutoEnterPipIfNeeded();
|
_disableAutoEnterPipIfNeeded();
|
||||||
@@ -1765,8 +1765,6 @@ class PlPlayerController with BlockConfigMixin {
|
|||||||
triggerFullScreen(status: false);
|
triggerFullScreen(status: false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!horizontalScreen && !isPortrait) {
|
Get.back();
|
||||||
Get.back();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user