Migrate runOnUI/runOnJS to scheduleOnUI/scheduleOnRN (#11249)

This commit is contained in:
Tomasz Zawadzki
2026-07-26 21:00:35 +02:00
committed by GitHub
parent d5e335e575
commit 2b9deeeb6a
24 changed files with 102 additions and 109 deletions
@@ -7,10 +7,10 @@ import {
import Animated, {
Extrapolation,
interpolate,
runOnJS,
useAnimatedStyle,
} from 'react-native-reanimated'
import {useSafeAreaInsets} from 'react-native-safe-area-context'
import {scheduleOnRN} from 'react-native-worklets'
import {GlassContainer} from 'expo-glass-effect'
import {LinearGradient} from 'expo-linear-gradient'
import {type $Typed, type ChatBskyConvoDefs} from '@atproto/api'
@@ -95,7 +95,7 @@ export function MessageComposer({
onEnd: evt => {
'worklet'
if (IS_ANDROID && evt.progress === 0) {
runOnJS(blur)()
scheduleOnRN(blur)
}
},
})
@@ -13,7 +13,6 @@ import {
KeyboardGestureArea,
} from 'react-native-keyboard-controller'
import Animated, {
runOnJS,
type ScrollEvent,
type SharedValue,
useAnimatedStyle,
@@ -22,6 +21,7 @@ import Animated, {
withTiming,
} from 'react-native-reanimated'
import {useSafeAreaInsets} from 'react-native-safe-area-context'
import {scheduleOnRN} from 'react-native-worklets'
import {
type $Typed,
type AppBskyEmbedRecord,
@@ -502,7 +502,7 @@ export function MessagesList({
(e.contentOffset.y > newMessagesPill.startContentOffset + 200 ||
isAtBottom.get())
) {
runOnJS(setNewMessagesPill)({
scheduleOnRN(setNewMessagesPill, {
show: false,
startContentOffset: 0,
})