about summary refs log tree commit diff
path: root/src/App.native.tsx
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2024-11-25 20:30:15 +0000
committerGitHub <noreply@github.com>2024-11-25 20:30:15 +0000
commitb0c36383a9a7304f94c2bb19f7cc4b37e0b4f637 (patch)
tree4001655a33bb300b99dbc81096ccc27fe4f712bd /src/App.native.tsx
parent6c81090021222263dbf1d546216ea0da95029738 (diff)
downloadvoidsky-b0c36383a9a7304f94c2bb19f7cc4b37e0b4f637.tar.zst
Ensure react-native-keyboard-controller enabled state doesn't get overwritten (#6727)
* revert to prev state instead of false

* add dep array

* use ref counting approach

* patch keyboard controller to allow changing the enabled prop

* remove state from patch

* change patched prop name

* remove Math.max check, log if < 0

* use noop provider

* rm patch, use `useRef`

* Style nits

* Rm on web

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Diffstat (limited to 'src/App.native.tsx')
-rw-r--r--src/App.native.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/App.native.tsx b/src/App.native.tsx
index 9b2940aa9..69f7faf9e 100644
--- a/src/App.native.tsx
+++ b/src/App.native.tsx
@@ -4,7 +4,6 @@ import '#/view/icons'
 
 import React, {useEffect, useState} from 'react'
 import {GestureHandlerRootView} from 'react-native-gesture-handler'
-import {KeyboardProvider} from 'react-native-keyboard-controller'
 import {RootSiblingParent} from 'react-native-root-siblings'
 import {
   initialWindowMetrics,
@@ -70,6 +69,7 @@ import {Splash} from '#/Splash'
 import {BottomSheetProvider} from '../modules/bottom-sheet'
 import {BackgroundNotificationPreferencesProvider} from '../modules/expo-background-notification-handler/src/BackgroundNotificationHandlerProvider'
 import {AppProfiler} from './AppProfiler'
+import {KeyboardControllerProvider} from './lib/hooks/useEnableKeyboardController'
 
 SplashScreen.preventAutoHideAsync()
 
@@ -188,7 +188,7 @@ function App() {
     <AppProfiler>
       <GeolocationProvider>
         <A11yProvider>
-          <KeyboardProvider enabled={false} statusBarTranslucent={true}>
+          <KeyboardControllerProvider>
             <SessionProvider>
               <PrefsStateProvider>
                 <I18nProvider>
@@ -217,7 +217,7 @@ function App() {
                 </I18nProvider>
               </PrefsStateProvider>
             </SessionProvider>
-          </KeyboardProvider>
+          </KeyboardControllerProvider>
         </A11yProvider>
       </GeolocationProvider>
     </AppProfiler>