Skip to content

Commit 7013c49

Browse files
committed
fix: ensure gesture tag is unique
to prevent bottomsheet not working after `clearHistory`
1 parent 6ebbf9b commit 7013c49

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ui-persistent-bottomsheet/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ import {
2828
} from '@nativescript/core';
2929
const OPEN_DURATION = 200;
3030
const CLOSE_DURATION = 200;
31-
export const PAN_GESTURE_TAG = 12431;
32-
export const NATIVE_GESTURE_TAG = 12421;
31+
export let PAN_GESTURE_TAG = 12400;
32+
// export const NATIVE_GESTURE_TAG = 12421;
3333
const DEFAULT_TRIGGER_WIDTH = 20;
3434
const SWIPE_DISTANCE_MINIMUM = 10;
3535

@@ -127,10 +127,10 @@ export class PersistentBottomSheet extends GridLayout {
127127
translationFunction?: (height: number, delta: number, progress: number) => { bottomSheet?: AnimationDefinition; backDrop?: AnimationDefinition };
128128
protected initGestures() {
129129
const manager = Manager.getInstance();
130-
const options = { gestureId: PAN_GESTURE_TAG, ...this.panGestureOptions };
130+
const options = { gestureId: PAN_GESTURE_TAG++, ...this.panGestureOptions };
131131
const gestureHandler = manager.createGestureHandler(HandlerType.PAN, options.gestureId, {
132132
shouldStartGesture: this.shouldStartGesture.bind(this),
133-
simultaneousHandlers: [NATIVE_GESTURE_TAG],
133+
// simultaneousHandlers: [NATIVE_GESTURE_TAG],
134134
minDist: SWIPE_DISTANCE_MINIMUM,
135135
...options
136136
});

0 commit comments

Comments
 (0)