From 68f215a8b512e5186b78180e8b717ad1b4f3f4d0 Mon Sep 17 00:00:00 2001 From: Delphine Bugner Date: Fri, 20 Oct 2023 18:52:01 +0200 Subject: [PATCH] fix: ensure status bar & orientation are updated on container update Status bar, Navigation bar and Orientation are changed in the trySetWindowTrait function, called in ScreenFragment that ScreenStackFragment extends - so do not forget the super to apply it correctly! This ensure status bar, navigation bar and orientation are set, even when Fragment or Activity are not available yet when the props is set, which can happen for example on the first setting of the Props. A similar fix is also done in the ScreenStackHeaderConfig onUpdate function. --- .../src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt b/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt index 358e200fed..c66b94947c 100644 --- a/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt +++ b/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt @@ -77,6 +77,7 @@ class ScreenStackFragment : ScreenFragment, ScreenStackFragmentWrapper { } override fun onContainerUpdate() { + super.onContainerUpdate() screen.headerConfig?.onUpdate() }