diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-11-08 03:38:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-08 03:38:32 +0000 |
commit | 468c4b8f5ae68f537f2844797472b4c3794b094b (patch) | |
tree | 1c92b729fb59d7b34e1ff733483131b8df1daef0 /src/components/dms/ActionsWrapper.tsx | |
parent | 22dd4947f7d88166350c13367f2af7a51a55a36b (diff) | |
download | voidsky-468c4b8f5ae68f537f2844797472b4c3794b094b.tar.zst |
Improve chat performance (#6157)
* fix worklet funcs on gestures * don't access .value in render
Diffstat (limited to 'src/components/dms/ActionsWrapper.tsx')
-rw-r--r-- | src/components/dms/ActionsWrapper.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/dms/ActionsWrapper.tsx b/src/components/dms/ActionsWrapper.tsx index 9b06bd0b2..b77516e7b 100644 --- a/src/components/dms/ActionsWrapper.tsx +++ b/src/components/dms/ActionsWrapper.tsx @@ -53,9 +53,11 @@ export function ActionsWrapper({ .numberOfTaps(2) .hitSlop(HITSLOP_10) .onEnd(open) + .runOnJS(true) const pressAndHoldGesture = Gesture.LongPress() .onStart(() => { + 'worklet' scale.value = withTiming(1.05, {duration: 200}, finished => { if (!finished) return runOnJS(open)() @@ -65,7 +67,6 @@ export function ActionsWrapper({ .onTouchesUp(shrink) .onTouchesMove(shrink) .cancelsTouchesInView(false) - .runOnJS(true) const composedGestures = Gesture.Exclusive( doubleTapGesture, |