about summary refs log tree commit diff
path: root/src/components/dms/ActionsWrapper.tsx
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2024-11-08 03:38:32 +0000
committerGitHub <noreply@github.com>2024-11-08 03:38:32 +0000
commit468c4b8f5ae68f537f2844797472b4c3794b094b (patch)
tree1c92b729fb59d7b34e1ff733483131b8df1daef0 /src/components/dms/ActionsWrapper.tsx
parent22dd4947f7d88166350c13367f2af7a51a55a36b (diff)
downloadvoidsky-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.tsx3
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,