mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-26 05:16:01 +08:00
@@ -14,6 +14,8 @@ $BottomSheetPatch = "lib/scripts/bottom_sheet.patch"
|
||||
|
||||
$ScrollViewPatch = "lib/scripts/scroll_view.patch"
|
||||
|
||||
$TextSelectionPatch = "lib/scripts/text_selection.patch"
|
||||
|
||||
# TODO: remove
|
||||
# https://github.com/flutter/flutter/issues/90223
|
||||
$ModalBarrierPatch = "lib/scripts/modal_barrier.patch"
|
||||
@@ -26,7 +28,7 @@ Set-Location $env:FLUTTER_ROOT
|
||||
|
||||
$picks = @()
|
||||
$reverts = @()
|
||||
$patches = @($ModalBarrierPatch, $MouseCursorPatch)
|
||||
$patches = @($ModalBarrierPatch, $TextSelectionPatch, $MouseCursorPatch)
|
||||
|
||||
switch ($platform.ToLower()) {
|
||||
"android" {
|
||||
|
||||
20
lib/scripts/text_selection.patch
Normal file
20
lib/scripts/text_selection.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
diff --git a/packages/flutter/lib/src/gestures/tap_and_drag.dart b/packages/flutter/lib/src/gestures/tap_and_drag.dart
|
||||
index 2409d19eabd..9460b61c00a 100644
|
||||
--- a/packages/flutter/lib/src/gestures/tap_and_drag.dart
|
||||
+++ b/packages/flutter/lib/src/gestures/tap_and_drag.dart
|
||||
@@ -1407,6 +1407,7 @@ class TapAndHorizontalDragGestureRecognizer extends BaseTapAndDragGestureRecogni
|
||||
|
||||
@override
|
||||
bool _hasSufficientGlobalDistanceToAccept(PointerDeviceKind pointerDeviceKind) {
|
||||
+ return false;
|
||||
return _globalDistanceMoved.abs() > computeHitSlop(pointerDeviceKind, gestureSettings);
|
||||
}
|
||||
|
||||
@@ -1442,6 +1443,7 @@ class TapAndPanGestureRecognizer extends BaseTapAndDragGestureRecognizer {
|
||||
|
||||
@override
|
||||
bool _hasSufficientGlobalDistanceToAccept(PointerDeviceKind pointerDeviceKind) {
|
||||
+ return true;
|
||||
return _globalDistanceMoved.abs() > computePanSlop(pointerDeviceKind, gestureSettings);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user