mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-04 09:09:48 +08:00
30 lines
903 B
Diff
30 lines
903 B
Diff
diff --git a/lib/pages/common/slide/common_slide_page.dart b/lib/pages/common/slide/common_slide_page.dart
|
|
index 58ba68b7c..159f5ba77 100644
|
|
--- a/lib/pages/common/slide/common_slide_page.dart
|
|
+++ b/lib/pages/common/slide/common_slide_page.dart
|
|
@@ -142,6 +142,24 @@ class SlideDragGestureRecognizer extends HorizontalDragGestureRecognizer {
|
|
bool isPointerAllowed(PointerEvent event) {
|
|
return isDxAllowed(event.localPosition.dx) && super.isPointerAllowed(event);
|
|
}
|
|
+
|
|
+ bool _hasAccepted = false;
|
|
+
|
|
+ @override
|
|
+ void handleEvent(PointerEvent event) {
|
|
+ if (event is PointerMoveEvent && !_hasAccepted) {
|
|
+ _hasAccepted = true;
|
|
+ resolve(.accepted);
|
|
+ return;
|
|
+ }
|
|
+ super.handleEvent(event);
|
|
+ }
|
|
+
|
|
+ @override
|
|
+ void stopTrackingPointer(int pointer) {
|
|
+ _hasAccepted = false;
|
|
+ super.stopTrackingPointer(pointer);
|
|
+ }
|
|
}
|
|
|
|
class TabBarDragGestureRecognizer
|