about summary refs log tree commit diff
path: root/src/components
diff options
context:
space:
mode:
authorKirill Zyusko <zyusko.kirik@gmail.com>2024-11-25 16:03:55 +0100
committerGitHub <noreply@github.com>2024-11-25 15:03:55 +0000
commit723bbfc58a1bb30ee0eed8e2e61d06bff2f10ece (patch)
treeff4c287fc6bd99729e5de85f16ce0441cb753dd3 /src/components
parent5164ca6288c233de1ea351e9d5e9a7218a8a3b34 (diff)
downloadvoidsky-723bbfc58a1bb30ee0eed8e2e61d06bff2f10ece.tar.zst
fix: keyboard handler memoization (#6719)
* fix: keyboard handler memoization

* fix: return missing dependency
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Dialog/index.tsx13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/components/Dialog/index.tsx b/src/components/Dialog/index.tsx
index c9455c5cc..f16a9925d 100644
--- a/src/components/Dialog/index.tsx
+++ b/src/components/Dialog/index.tsx
@@ -214,12 +214,15 @@ export const ScrollableInner = React.forwardRef<ScrollView, DialogInnerProps>(
       }
     })
 
-    useKeyboardHandler({
-      onEnd: e => {
-        'worklet'
-        runOnJS(setKeyboardHeight)(e.height)
+    useKeyboardHandler(
+      {
+        onEnd: e => {
+          'worklet'
+          runOnJS(setKeyboardHeight)(e.height)
+        },
       },
-    })
+      [],
+    )
 
     const basePading =
       (isIOS ? 30 : 50) + (isIOS ? keyboardHeight / 4 : keyboardHeight)