Skip to content

Commit

Permalink
Merge pull request Expensify#47669 from situchan/fix-47662
Browse files Browse the repository at this point in the history
Revert "fix: use `KeyboardAvoidingView` from `react-native-keyboard-controller`"
  • Loading branch information
neil-marcellini authored Aug 20, 2024
2 parents e9faa65 + 4463d8f commit 892f641
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 33 deletions.
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-keyboard-controller (1.13.0):
- react-native-keyboard-controller (1.12.2):
- glog
- hermes-engine
- RCT-Folly (= 2022.05.16.00)
Expand Down Expand Up @@ -2565,7 +2565,7 @@ SPEC CHECKSUMS:
react-native-geolocation: 580c86eb531c0aaf7a14bc76fd2983ce47ca58aa
react-native-image-picker: f8a13ff106bcc7eb00c71ce11fdc36aac2a44440
react-native-key-command: 28ccfa09520e7d7e30739480dea4df003493bfe8
react-native-keyboard-controller: a8cbf848d0bc0e1976a07948f1c53b8432c1246c
react-native-keyboard-controller: 47c01b0741ae5fc84e53cf282e61cfa5c2edb19b
react-native-launch-arguments: 5f41e0abf88a15e3c5309b8875d6fd5ac43df49d
react-native-netinfo: 02d31de0e08ab043d48f2a1a8baade109d7b6ca5
react-native-pager-view: ccd4bbf9fc7effaf8f91f8dae43389844d9ef9fa
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
"react-native-image-picker": "^7.0.3",
"react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#93399c6410de32966eb57085936ef6951398c2c3",
"react-native-key-command": "^1.0.8",
"react-native-keyboard-controller": "1.13.0",
"react-native-keyboard-controller": "^1.12.2",
"react-native-launch-arguments": "^4.0.2",
"react-native-linear-gradient": "^2.8.1",
"react-native-localize": "^2.2.6",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/node_modules/react-native-keyboard-controller/android/src/main/java/com/reactnativekeyboardcontroller/views/EdgeToEdgeReactViewGroup.kt b/node_modules/react-native-keyboard-controller/android/src/main/java/com/reactnativekeyboardcontroller/views/EdgeToEdgeReactViewGroup.kt
index 6e566fc..07ccb3c 100644
index 83884d8..5d9e989 100644
--- a/node_modules/react-native-keyboard-controller/android/src/main/java/com/reactnativekeyboardcontroller/views/EdgeToEdgeReactViewGroup.kt
+++ b/node_modules/react-native-keyboard-controller/android/src/main/java/com/reactnativekeyboardcontroller/views/EdgeToEdgeReactViewGroup.kt
@@ -117,12 +117,12 @@ class EdgeToEdgeReactViewGroup(private val reactContext: ThemedReactContext) : R
@@ -99,12 +99,12 @@ class EdgeToEdgeReactViewGroup(private val reactContext: ThemedReactContext) : R
}

private fun goToEdgeToEdge(edgeToEdge: Boolean) {
Expand All @@ -12,42 +12,28 @@ index 6e566fc..07ccb3c 100644
- !edgeToEdge,
- )
- }
+ // reactContext.currentActivity?.let {
+ // WindowCompat.setDecorFitsSystemWindows(
+ // it.window,
+ // !edgeToEdge,
+ // )
+ // }
+ // reactContext.currentActivity?.let {
+ // WindowCompat.setDecorFitsSystemWindows(
+ // it.window,
+ // !edgeToEdge,
+ // )
+ // }
}

private fun setupKeyboardCallbacks() {
@@ -169,16 +169,16 @@ class EdgeToEdgeReactViewGroup(private val reactContext: ThemedReactContext) : R
@@ -158,13 +158,13 @@ class EdgeToEdgeReactViewGroup(private val reactContext: ThemedReactContext) : R
// region State managers
private fun enable() {
this.goToEdgeToEdge(true)
- this.setupWindowInsets()
+ // this.setupWindowInsets()
this.setupKeyboardCallbacks()
- modalAttachedWatcher.enable()
+ // modalAttachedWatcher.enable()
}

private fun disable() {
this.goToEdgeToEdge(false)
- this.setupWindowInsets()
+ // this.setupWindowInsets()
this.removeKeyboardCallbacks()
- modalAttachedWatcher.disable()
+ // modalAttachedWatcher.disable()
}
// endregion

@@ -206,7 +206,7 @@ class EdgeToEdgeReactViewGroup(private val reactContext: ThemedReactContext) : R
fun forceStatusBarTranslucent(isStatusBarTranslucent: Boolean) {
if (active && this.isStatusBarTranslucent != isStatusBarTranslucent) {
this.isStatusBarTranslucent = isStatusBarTranslucent
- this.setupWindowInsets()
+ // this.setupWindowInsets()
this.requestApplyInsetsWhenAttached()
}
}
// endregion
2 changes: 1 addition & 1 deletion src/components/KeyboardAvoidingView/index.ios.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 892f641

Please sign in to comment.