Skip to content

Commit 191eb45

Browse files
authored
Merge pull request #55442 from linhvovan29546/fix/54767-in-debug-menu-toggle-action-delay
2 parents d91e4b6 + 333525a commit 191eb45

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/components/Switch.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, {useEffect} from 'react';
2-
import {InteractionManager} from 'react-native';
32
import Animated, {interpolateColor, useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated';
43
import useTheme from '@hooks/useTheme';
54
import useThemeStyles from '@hooks/useThemeStyles';
@@ -43,7 +42,7 @@ function Switch({isOn, onToggle, accessibilityLabel, disabled, showLockIcon, dis
4342
}, [isOn, offsetX]);
4443

4544
const handleSwitchPress = () => {
46-
InteractionManager.runAfterInteractions(() => {
45+
requestAnimationFrame(() => {
4746
if (disabled) {
4847
disabledAction?.();
4948
return;

0 commit comments

Comments
 (0)