mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: video page
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -214,6 +214,8 @@ class VideoDetailController extends GetxController
|
||||
PlayerStatus? playerStatus;
|
||||
StreamSubscription<Duration>? positionSubscription;
|
||||
|
||||
PersistentBottomSheetController? bsController;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
@@ -1043,15 +1045,17 @@ class VideoDetailController extends GetxController
|
||||
),
|
||||
);
|
||||
}
|
||||
plPlayerController.isFullScreen.value
|
||||
? scaffoldKey.currentState?.showBottomSheet(
|
||||
enableDrag: false,
|
||||
(context) => _postPanel(false),
|
||||
)
|
||||
: childKey.currentState?.showBottomSheet(
|
||||
enableDrag: false,
|
||||
(context) => _postPanel(),
|
||||
);
|
||||
if (plPlayerController.isFullScreen.value) {
|
||||
bsController = scaffoldKey.currentState?.showBottomSheet(
|
||||
enableDrag: false,
|
||||
(context) => _postPanel(false),
|
||||
);
|
||||
} else {
|
||||
childKey.currentState?.showBottomSheet(
|
||||
enableDrag: false,
|
||||
(context) => _postPanel(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Widget _postPanel([bool isChild = true]) => StatefulBuilder(
|
||||
@@ -1206,7 +1210,14 @@ class VideoDetailController extends GetxController
|
||||
iconButton(
|
||||
context: context,
|
||||
tooltip: '关闭',
|
||||
onPressed: Get.back,
|
||||
onPressed: () {
|
||||
if (bsController != null) {
|
||||
bsController!.close();
|
||||
bsController = null;
|
||||
} else {
|
||||
Get.back();
|
||||
}
|
||||
},
|
||||
icon: Icons.close,
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
|
||||
Reference in New Issue
Block a user