From 566e67381cf0f710a4e4f64ae567873488205fd9 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 28 Aug 2025 12:06:06 +0200 Subject: [PATCH 1/3] fix: add back RN patch --- patches/react-native/details.md | 11 +++++++- ...fix-modal-transparent-navigation-bar.patch | 26 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 patches/react-native/react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch diff --git a/patches/react-native/details.md b/patches/react-native/details.md index 85f3c5f4a3677..401ac5c2a46d3 100644 --- a/patches/react-native/details.md +++ b/patches/react-native/details.md @@ -189,4 +189,13 @@ - Reason: This patch fixes a crash that occurred when the clipboard text data can be null. - Upstream PR/issue: 🛑 - E/App issue: [#66925](https://github.com/Expensify/App/issues/66925) -- PR introducing patch: [#66749](https://github.com/Expensify/App/pull/66749) \ No newline at end of file +- PR introducing patch: [#66749](https://github.com/Expensify/App/pull/66749) + +- PR introducing patch: [#66749](https://github.com/Expensify/App/pull/66749) +- +### [react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch](react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch) + +- Reason: This patch fixes an issue where it is not possible to enable a transparent navigation bar on Android +- Upstream PR/issue: 🛑 +- E/App issue: [#69005](https://github.com/Expensify/App/issues/69005) +- PR introducing patch: [#69004](https://github.com/Expensify/App/pull/69004) diff --git a/patches/react-native/react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch b/patches/react-native/react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch new file mode 100644 index 0000000000000..aa2dc57b04489 --- /dev/null +++ b/patches/react-native/react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch @@ -0,0 +1,26 @@ +diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +index 139a1c1..f6d1faa 100644 +--- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt ++++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +@@ -361,6 +361,21 @@ public class ReactModalHostView(context: ThemedReactContext) : + // Navigation bar cannot be translucent without status bar being translucent too + dialogWindow.setSystemBarsTranslucency(navigationBarTranslucent) + ++ // If enforceNavigationBarContrast is explicitly set in the app theme (AppTheme), ++ // we need to override the default behaviour for edge-to-edge mode in WindowUtils.setSystemBarsTranslucency. ++ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { ++ val attrs = intArrayOf(android.R.attr.enforceNavigationBarContrast) ++ val ta = context.obtainStyledAttributes(R.style.AppTheme, attrs) ++ ++ if (ta.length() == 1) { ++ val enforceNavigationBarContrastStyleValue = ta.getBoolean(0, false) ++ dialogWindow.isNavigationBarContrastEnforced = enforceNavigationBarContrastStyleValue ++ } ++ ++ ta.recycle() ++ } ++ ++ + if (!navigationBarTranslucent) { + dialogWindow.setStatusBarTranslucency(statusBarTranslucent) + } \ No newline at end of file From 8bd37094a9d1c43997dd138f16458532dc7bd3e2 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 28 Aug 2025 15:06:12 +0200 Subject: [PATCH 2/3] fix: patch --- ...tive+0.79.2+028+fix-modal-transparent-navigation-bar.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/react-native/react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch b/patches/react-native/react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch index aa2dc57b04489..834e15fcafd37 100644 --- a/patches/react-native/react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch +++ b/patches/react-native/react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch @@ -8,9 +8,9 @@ index 139a1c1..f6d1faa 100644 + // If enforceNavigationBarContrast is explicitly set in the app theme (AppTheme), + // we need to override the default behaviour for edge-to-edge mode in WindowUtils.setSystemBarsTranslucency. -+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { ++ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + val attrs = intArrayOf(android.R.attr.enforceNavigationBarContrast) -+ val ta = context.obtainStyledAttributes(R.style.AppTheme, attrs) ++ val ta = context.obtainStyledAttributes(R.style.Theme_FullScreenDialog, attrs) + + if (ta.length() == 1) { + val enforceNavigationBarContrastStyleValue = ta.getBoolean(0, false) From 5ceaa18537fa40c524726467e02c41afdb21ee40 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 28 Aug 2025 15:06:35 +0200 Subject: [PATCH 3/3] fix: add v29 style for Modal --- android/app/src/main/res/values-v29/styles.xml | 11 +++++++++++ android/app/src/main/res/values/styles.xml | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 android/app/src/main/res/values-v29/styles.xml diff --git a/android/app/src/main/res/values-v29/styles.xml b/android/app/src/main/res/values-v29/styles.xml new file mode 100644 index 0000000000000..24a6c3efcc6f8 --- /dev/null +++ b/android/app/src/main/res/values-v29/styles.xml @@ -0,0 +1,11 @@ + + + + \ No newline at end of file diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 42da35d7a493b..220bbe6e655e5 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -8,7 +8,6 @@ @color/gray4 @android:color/transparent @android:color/transparent - false @color/accent @drawable/rn_edit_text_material @style/AppTheme.Popup