Skip to content

Commit

Permalink
Merge pull request #55442 from linhvovan29546/fix/54767-in-debug-menu…
Browse files Browse the repository at this point in the history
…-toggle-action-delay
  • Loading branch information
dangrous authored Jan 21, 2025
2 parents d91e4b6 + 333525a commit 191eb45
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/Switch.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, {useEffect} from 'react';
import {InteractionManager} from 'react-native';
import Animated, {interpolateColor, useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
Expand Down Expand Up @@ -43,7 +42,7 @@ function Switch({isOn, onToggle, accessibilityLabel, disabled, showLockIcon, dis
}, [isOn, offsetX]);

const handleSwitchPress = () => {
InteractionManager.runAfterInteractions(() => {
requestAnimationFrame(() => {
if (disabled) {
disabledAction?.();
return;
Expand Down

0 comments on commit 191eb45

Please sign in to comment.