Skip to content

Commit 79b7d1f

Browse files
authored
fix: build errors for Fabric on RN 78 (#827)
## 📜 Description Removed nullability of delegates. ## 💡 Motivation and Context It was auto generated code by Android studio when original classes (from react-native) had java classes. Now they are defined in Kotlin and explicitly are marked as non-nullable, so it conflicts with the code. So in this PR I remove "nullability" of delegates - it still will be compatible with older RN versions and new RN 0.78 will be supported too 🤞 Closes #826 ## 📢 Changelog <!-- High level overview of important changes --> <!-- For example: fixed status bar manipulation; added new types declarations; --> <!-- If your changes don't affect one of platform/language below - then remove this platform/language --> ### Android - removed nullability of delegates; ## 🤔 How Has This Been Tested? Tested in RN 0.78 branch. ## 📸 Screenshots (if appropriate): <img width="716" alt="image" src="https://github.com/user-attachments/assets/cac7f148-725e-4c24-a89a-777c49e1c915" /> <img width="651" alt="image" src="https://github.com/user-attachments/assets/9327ddb5-129d-4a18-b7b1-ff613e99ce48" /> ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
1 parent 137fb41 commit 79b7d1f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

android/src/fabric/java/com/reactnativekeyboardcontroller/KeyboardControllerViewManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class KeyboardControllerViewManager(
1818
private val manager = KeyboardControllerViewManagerImpl(mReactContext)
1919
private val mDelegate = KeyboardControllerViewManagerDelegate(this)
2020

21-
override fun getDelegate(): ViewManagerDelegate<ReactViewGroup?> = mDelegate
21+
override fun getDelegate(): ViewManagerDelegate<ReactViewGroup> = mDelegate
2222

2323
override fun getName(): String = KeyboardControllerViewManagerImpl.NAME
2424

android/src/fabric/java/com/reactnativekeyboardcontroller/KeyboardGestureAreaViewManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class KeyboardGestureAreaViewManager(
1818
private val manager = KeyboardGestureAreaViewManagerImpl(mReactContext)
1919
private val mDelegate = KeyboardGestureAreaManagerDelegate(this)
2020

21-
override fun getDelegate(): ViewManagerDelegate<ReactViewGroup?> = mDelegate
21+
override fun getDelegate(): ViewManagerDelegate<ReactViewGroup> = mDelegate
2222

2323
override fun getName(): String = KeyboardGestureAreaViewManagerImpl.NAME
2424

android/src/fabric/java/com/reactnativekeyboardcontroller/OverKeyboardViewManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class OverKeyboardViewManager(
1919
private val manager = OverKeyboardViewManagerImpl(mReactContext)
2020
private val mDelegate = OverKeyboardViewManagerDelegate(this)
2121

22-
override fun getDelegate(): ViewManagerDelegate<OverKeyboardHostView?> = mDelegate
22+
override fun getDelegate(): ViewManagerDelegate<OverKeyboardHostView> = mDelegate
2323

2424
override fun getName(): String = OverKeyboardViewManagerImpl.NAME
2525

0 commit comments

Comments
 (0)