react-native-navigation 7.51.0 → 7.51.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,6 @@ import androidx.core.view.WindowInsetsControllerCompat
12
12
  import kotlin.math.abs
13
13
  import kotlin.math.ceil
14
14
 
15
-
16
15
  object SystemUiUtils {
17
16
  private const val STATUS_BAR_HEIGHT_M = 24
18
17
  internal const val STATUS_BAR_HEIGHT_TRANSLUCENCY = 0.65f
@@ -20,7 +19,6 @@ object SystemUiUtils {
20
19
  var navigationBarDefaultColor = -1
21
20
  private set
22
21
 
23
-
24
22
  @JvmStatic
25
23
  fun getStatusBarHeight(activity: Activity?): Int {
26
24
  val res = if (statusBarHeight > 0) {
@@ -167,4 +165,4 @@ object SystemUiUtils {
167
165
  }
168
166
  }
169
167
 
170
- }
168
+ }
@@ -120,7 +120,8 @@ class StatusBarPresenter private constructor(
120
120
 
121
121
  private fun setStatusBarVisible(viewController: ViewController<*>, visible: Bool) {
122
122
  val window = window.get() ?: return
123
- val view = if (viewController.view != null) viewController.view else window.decorView
123
+ val view = viewController.peekView() ?: window.decorView
124
+
124
125
  if (visible.isFalse) {
125
126
  hideStatusBar(window, view)
126
127
  } else {
@@ -254,6 +254,11 @@ public abstract class ViewController<T extends ViewGroup> implements ViewTreeObs
254
254
  if (view.getParent() == null) parent.addView(view, index);
255
255
  }
256
256
 
257
+ @Nullable
258
+ public T peekView() {
259
+ return view;
260
+ }
261
+
257
262
  public String getId() {
258
263
  return id;
259
264
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-navigation",
3
- "version": "7.51.0",
3
+ "version": "7.51.1",
4
4
  "description": "React Native Navigation - truly native navigation for iOS and Android",
5
5
  "license": "MIT",
6
6
  "nativePackage": true,
@@ -168,7 +168,7 @@
168
168
  "emulator": {
169
169
  "type": "android.emulator",
170
170
  "device": {
171
- "avdName": "Pixel_API_28"
171
+ "avdName": "Pixel_API_29"
172
172
  }
173
173
  }
174
174
  },