Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-25 17:30:25 +08:00
parent 7ace981f24
commit 361eb4c614
5 changed files with 94 additions and 232 deletions

View File

@@ -40,12 +40,12 @@ mixin CommonSlideMixin<T extends CommonSlidePage> on State<T>, TickerProvider {
final isRTL = dx >= _maxWidth - offset;
if (isLTR || isRTL) {
_isRTL = isRTL;
_downDx = dx;
return true;
}
return false;
},
)
..onStart = _onDragStart
..onUpdate = _onDragUpdate
..onEnd = _onDragEnd
..onCancel = _onDragEnd;
@@ -101,6 +101,10 @@ mixin CommonSlideMixin<T extends CommonSlidePage> on State<T>, TickerProvider {
_downDx = null;
}
void _onDragStart(DragStartDetails details) {
_downDx = details.localPosition.dx;
}
void _onDragUpdate(DragUpdateDetails details) {
final from = _downDx!;
final to = details.localPosition.dx;

View File

@@ -1344,13 +1344,13 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
required double height,
bool isPipMode = false,
}) => PopScope(
key: videoDetailController.videoPlayerKey,
canPop:
!isFullScreen &&
!videoDetailController.plPlayerController.isDesktopPip &&
(videoDetailController.horizontalScreen || isPortrait),
onPopInvokedWithResult: _onPopInvokedWithResult,
child: Obx(
key: videoDetailController.videoPlayerKey,
() =>
videoDetailController.videoState.value is! Success ||
!videoDetailController.autoPlay.value ||