Improve chat performance (#6157)

* fix worklet funcs on gestures

* don't access .value in render
This commit is contained in:
Samuel Newman
2024-11-08 03:38:32 +00:00
committed by GitHub
parent 22dd4947f7
commit 468c4b8f5a
3 changed files with 8 additions and 9 deletions
+2 -1
View File
@@ -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,