From 3d4b390a8a9c4a7c52354a0c7bd4bc0a8e12f9f8 Mon Sep 17 00:00:00 2001
From: Samuel Newman <mozzius@protonmail.com>
Date: Tue, 11 Jun 2024 20:50:56 +0100
Subject: Only enable keyboard controller when necessary (#4483)

* Only enable keyboard controller when necessary

* make it screen only

* rm keyboard padding

* rm keyboardpadding file

* revert using keyboard controller in composer

* remove styles.outer (unnecessary for revert)

* continue to use keyboard padding in the report dialog for dms

---------

Co-authored-by: Hailey <me@haileyok.com>
---
 src/components/KeyboardPadding.android.tsx | 31 ------------------------------
 1 file changed, 31 deletions(-)
 delete mode 100644 src/components/KeyboardPadding.android.tsx

(limited to 'src/components/KeyboardPadding.android.tsx')

diff --git a/src/components/KeyboardPadding.android.tsx b/src/components/KeyboardPadding.android.tsx
deleted file mode 100644
index 40dec3001..000000000
--- a/src/components/KeyboardPadding.android.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-import React from 'react'
-import {useKeyboardHandler} from 'react-native-keyboard-controller'
-import Animated, {
-  useAnimatedStyle,
-  useSharedValue,
-} from 'react-native-reanimated'
-
-export function KeyboardPadding({maxHeight}: {maxHeight?: number}) {
-  const keyboardHeight = useSharedValue(0)
-
-  useKeyboardHandler(
-    {
-      onMove: e => {
-        'worklet'
-
-        if (maxHeight && e.height > maxHeight) {
-          keyboardHeight.value = maxHeight
-        } else {
-          keyboardHeight.value = e.height
-        }
-      },
-    },
-    [maxHeight],
-  )
-
-  const animatedStyle = useAnimatedStyle(() => ({
-    height: keyboardHeight.value,
-  }))
-
-  return <Animated.View style={animatedStyle} />
-}
-- 
cgit 1.4.1

