Skip to content

Commit bcc5240

Browse files
committed
Rename
1 parent 3ca99f5 commit bcc5240

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

android/src/main/java/com/swmansion/rnscreens/bottomsheet/SheetDelegate.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,13 +324,13 @@ class SheetDelegate(
324324
): WindowInsetsCompat {
325325
val isImeVisible = insets.isVisible(WindowInsetsCompat.Type.ime())
326326
val imeInset = insets.getInsets(WindowInsetsCompat.Type.ime())
327-
val prevSystemBarsInsets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
328-
val prevDisplayCutoutInsets = insets.getInsets(WindowInsetsCompat.Type.displayCutout())
327+
val systemBarsInsets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
328+
val displayCutoutInsets = insets.getInsets(WindowInsetsCompat.Type.displayCutout())
329329

330330
// We save the top inset (status bar height or display cutout) to later
331331
// subtract it from the window height during sheet size calculations.
332332
// This ensures the sheet respects the safe area.
333-
lastTopInset = maxOf(prevSystemBarsInsets.top, prevDisplayCutoutInsets.top)
333+
lastTopInset = maxOf(systemBarsInsets.top, displayCutoutInsets.top)
334334

335335
if (isImeVisible) {
336336
isKeyboardVisible = true
@@ -351,7 +351,7 @@ class SheetDelegate(
351351
isKeyboardVisible = false
352352
}
353353

354-
val newBottomInset = if (!isImeVisible) prevSystemBarsInsets.bottom else 0
354+
val newBottomInset = if (!isImeVisible) systemBarsInsets.bottom else 0
355355

356356
// Note: We do not manipulate the top inset manually. Therefore, if SafeAreaView has top insets enabled,
357357
// we must retain the top inset even if the formSheet does not currently overflow into the status bar.
@@ -363,7 +363,7 @@ class SheetDelegate(
363363
.Builder(insets)
364364
.setInsets(
365365
WindowInsetsCompat.Type.systemBars(),
366-
Insets.of(prevSystemBarsInsets.left, prevSystemBarsInsets.top, prevSystemBarsInsets.right, newBottomInset),
366+
Insets.of(systemBarsInsets.left, systemBarsInsets.top, systemBarsInsets.right, newBottomInset),
367367
).build()
368368
}
369369

0 commit comments

Comments
 (0)