olshevski / compose-navigation-reimagined

🌈 Type-safe navigation library for Jetpack Compose
https://olshevski.github.io/compose-navigation-reimagined/
MIT License
544 stars 18 forks source link

BottomSheet gets stuck if .pop() is called while dragging the sheet #25

Closed GytisBarakauskas closed 1 year ago

GytisBarakauskas commented 1 year ago

Sample app with a bit of code changes can be used to reproduce.

In the FirstBottomSheet make the button call navController.pop() instead of opening navController.navigate(BottomSheetDestination.Second).

                BottomSheetDestination.First -> FirstBottomSheet(
                    onOpenSecondSheetClick = {
                        navController.pop()
                    }
                )

Click on the bottom sheet and hold it, and then press the button to call .pop().

Sheet will expand fully and get stuck, neither dragging nor .pop() is working anymore. Attaching video

https://github.com/olshevski/compose-navigation-reimagined/assets/72445222/13121a58-814e-4043-97a7-493359595670

olshevski commented 1 year ago

The issue is fixed in version 1.5.0-beta01.

Please let me know if you need a patch for Compose 1.4.