From 4168f6e9a7185645055dad282aa450d0bffbfea8 Mon Sep 17 00:00:00 2001 From: Alex Beaman Date: Fri, 2 Aug 2024 12:12:47 -0700 Subject: [PATCH] Revert "fix: use `KeyboardAvoidingView` from keyboard controller" --- ...roller+1.12.2+002+keyboard-avoiding-view.patch | 15 --------------- ...react-native-keyboard-controller+1.12.2.patch} | 0 src/components/KeyboardAvoidingView/index.ios.tsx | 2 +- 3 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 patches/react-native-keyboard-controller+1.12.2+002+keyboard-avoiding-view.patch rename patches/{react-native-keyboard-controller+1.12.2+001+initial.patch => react-native-keyboard-controller+1.12.2.patch} (100%) diff --git a/patches/react-native-keyboard-controller+1.12.2+002+keyboard-avoiding-view.patch b/patches/react-native-keyboard-controller+1.12.2+002+keyboard-avoiding-view.patch deleted file mode 100644 index 3002a50c7986..000000000000 --- a/patches/react-native-keyboard-controller+1.12.2+002+keyboard-avoiding-view.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/node_modules/react-native-keyboard-controller/src/components/KeyboardAvoidingView/hooks.ts b/node_modules/react-native-keyboard-controller/src/components/KeyboardAvoidingView/hooks.ts -index 676eafc..6d84beb 100644 ---- a/node_modules/react-native-keyboard-controller/src/components/KeyboardAvoidingView/hooks.ts -+++ b/node_modules/react-native-keyboard-controller/src/components/KeyboardAvoidingView/hooks.ts -@@ -33,6 +33,10 @@ export const useKeyboardAnimation = () => { - - isClosed.value = e.height === 0; - -+ if (e.height > 0) { -+ heightWhenOpened.value = e.height; -+ } -+ - // `height` update happens in `onMove` handler - // in `onEnd` we need to update only if `onMove` - // wasn't called (i. e. duration === 0) diff --git a/patches/react-native-keyboard-controller+1.12.2+001+initial.patch b/patches/react-native-keyboard-controller+1.12.2.patch similarity index 100% rename from patches/react-native-keyboard-controller+1.12.2+001+initial.patch rename to patches/react-native-keyboard-controller+1.12.2.patch diff --git a/src/components/KeyboardAvoidingView/index.ios.tsx b/src/components/KeyboardAvoidingView/index.ios.tsx index 68cfa73e90b5..171210eab7ac 100644 --- a/src/components/KeyboardAvoidingView/index.ios.tsx +++ b/src/components/KeyboardAvoidingView/index.ios.tsx @@ -2,7 +2,7 @@ * The KeyboardAvoidingView is only used on ios */ import React from 'react'; -import {KeyboardAvoidingView as KeyboardAvoidingViewComponent} from 'react-native-keyboard-controller'; +import {KeyboardAvoidingView as KeyboardAvoidingViewComponent} from 'react-native'; import type {KeyboardAvoidingViewProps} from './types'; function KeyboardAvoidingView(props: KeyboardAvoidingViewProps) {