stripe-android
stripe-android copied to clipboard
Fix issue with swipe-to-dismiss on bottom sheet
Summary
This pull request fixes an issue arising from the use of BottomSheetNavigator: Dismissing the bottom sheet by swiping down doesn’t pop the NavController’s back stack, meaning that we’re left with an empty overlay that will consume the next back press (and do nothing). See the videos below!
With this change, we’re removing the now-disappeared bottom sheet destination from the back stack, so it accurately represents the state that’s visible on the screen.
Motivation
Testing
- [x] Added tests
- [ ] Modified tests
- [x] Manually verified
Screen recordings
Before
https://github.com/stripe/stripe-android/assets/110940675/0a855a0f-a1af-499e-9865-a4b0f6f07454
After
https://github.com/stripe/stripe-android/assets/110940675/a6df1303-7537-4dd1-80a3-a261226af780