diff --git a/lib/pages/video/detail/reply_reply/view.dart b/lib/pages/video/detail/reply_reply/view.dart index 54fa43c37..a1547eec1 100644 --- a/lib/pages/video/detail/reply_reply/view.dart +++ b/lib/pages/video/detail/reply_reply/view.dart @@ -125,15 +125,19 @@ class _VideoReplyReplyPanelState extends State return GStorage.slideDismissReplyPage ? GestureDetector( onPanDown: (event) { - _downPos = event.localPosition; + if (event.localPosition.dx > 30) { + _isSliding = false; + } else { + _downPos = event.localPosition; + } }, onPanUpdate: (event) { if (_isSliding == false) { return; } else if (_isSliding == null) { - if (_downPos != null && _downPos!.dx <= 25) { + if (_downPos != null) { Offset cumulativeDelta = event.localPosition - _downPos!; - if (cumulativeDelta.dx.abs() > 3 * cumulativeDelta.dy.abs()) { + if (cumulativeDelta.dx.abs() >= cumulativeDelta.dy.abs()) { _isSliding = true; setState(() { padding.value = event.localPosition.dx; diff --git a/lib/pages/video/detail/view_v.dart b/lib/pages/video/detail/view_v.dart index 1914b5d84..abf2b5162 100644 --- a/lib/pages/video/detail/view_v.dart +++ b/lib/pages/video/detail/view_v.dart @@ -675,22 +675,14 @@ class _VideoDetailPageVState extends State videoDetailController.animationController.value == 1) { videoDetailController.isExpanding = false; WidgetsBinding.instance.addPostFrameCallback((_) { - if (videoDetailController.scrollKey.currentState?.mounted == - true) { - videoDetailController.scrollRatio.value = 0; - videoDetailController.scrollKey.currentState - ?.setState(() {}); - } + videoDetailController.scrollRatio.value = 0; + refreshPage(); }); } else if (videoDetailController.isCollapsing && videoDetailController.animationController.value == 1) { videoDetailController.isCollapsing = false; WidgetsBinding.instance.addPostFrameCallback((_) { - if (videoDetailController.scrollKey.currentState?.mounted == - true) { - videoDetailController.scrollKey.currentState - ?.setState(() {}); - } + refreshPage(); }); } return height; @@ -731,7 +723,10 @@ class _VideoDetailPageVState extends State showStatusBar(); } } - if (removeSafeArea && isFullScreen) { + if (removeSafeArea && + isFullScreen && + videoDetailController.direction.value == + 'vertical') { WidgetsBinding.instance.addPostFrameCallback((_) { refreshPage(); });