Skip to content

Commit 9b8a246

Browse files
authored
fix(android): back handler blocking navigation when sheet is hidden (#577)
* fix(android): back handler blocking navigation when sheet is hidden for screen * docs: add changelog entry
1 parent d6b4087 commit 9b8a246

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### 🐛 Bug fixes
6+
7+
- **Android**: Fixed back handler blocking navigation when sheet is hidden for screen. ([#577](https://github.com/lodev09/react-native-true-sheet/pull/577) by [@lodev09](https://github.com/lodev09))
8+
59
## 3.9.8
610

711
### 🐛 Bug fixes

android/src/main/java/com/lodev09/truesheet/TrueSheetViewController.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ class TrueSheetViewController(private val reactContext: ThemedReactContext) :
624624

625625
isSheetVisible = false
626626
wasHiddenByScreen = true
627+
backCallback?.isEnabled = false
627628

628629
dimViews.forEach { it.animate().alpha(0f).setDuration(SCREEN_FADE_DURATION).start() }
629630
sheet.animate()
@@ -643,6 +644,7 @@ class TrueSheetViewController(private val reactContext: ThemedReactContext) :
643644
setSheetVisibility(true)
644645
sheetView?.alpha = 1f
645646
updateDimAmount(animated = true)
647+
backCallback?.isEnabled = true
646648
}
647649

648650
/**

0 commit comments

Comments
 (0)