Skip to content

Commit

Permalink
fix: android action onclick
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnartorfis committed Sep 19, 2024
1 parent 39d852d commit 5e8a4b0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gestures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ export const ToastSwipeHandler: React.FC<
const threshold = direction === 'left' ? -WINDOW_WIDTH * 0.25 : -16;
const shouldDismiss = translate.value < threshold;

if (Math.abs(translate.value) < 16) {
translate.value = withTiming(0, {
easing: Easing.elastic(0.8),
});
return;
}

if (shouldDismiss) {
translate.value = withTiming(
-WINDOW_WIDTH,
Expand Down

0 comments on commit 5e8a4b0

Please sign in to comment.