@sdcx/bottom-sheet 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -163,7 +163,7 @@ public class BottomSheet extends ReactViewGroup implements NestedScrollingParent
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
public void setStatus(BottomSheetStatus status) {
|
|
166
|
-
if (this.status == status) {
|
|
166
|
+
if (this.status == status || this.status == SETTLING) {
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
169
|
|
|
@@ -221,6 +221,7 @@ public class BottomSheet extends ReactViewGroup implements NestedScrollingParent
|
|
|
221
221
|
if (!draggable) {
|
|
222
222
|
return false;
|
|
223
223
|
}
|
|
224
|
+
|
|
224
225
|
int action = event.getActionMasked();
|
|
225
226
|
// Record the velocity
|
|
226
227
|
if (action == MotionEvent.ACTION_DOWN) {
|
|
@@ -278,7 +279,8 @@ public class BottomSheet extends ReactViewGroup implements NestedScrollingParent
|
|
|
278
279
|
&& Math.abs(initialY - event.getY()) > viewDragHelper.getTouchSlop();
|
|
279
280
|
}
|
|
280
281
|
|
|
281
|
-
@
|
|
282
|
+
@SuppressLint("ClickableViewAccessibility")
|
|
283
|
+
@Override
|
|
282
284
|
public boolean onTouchEvent(@NonNull MotionEvent event) {
|
|
283
285
|
if (!draggable) {
|
|
284
286
|
return false;
|
|
@@ -156,6 +156,10 @@ using namespace facebook::react;
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
|
|
159
|
+
if (!self.draggable) {
|
|
160
|
+
return NO;
|
|
161
|
+
}
|
|
162
|
+
|
|
159
163
|
if (gestureRecognizer != self.panGestureRecognizer) {
|
|
160
164
|
return YES;
|
|
161
165
|
}
|