ui: fix incorrect back navigation
Fix the app incorrectly navigating away when a gesture accidentally dragged one of the bottom sheets.
This commit is contained in:
parent
40af4adc51
commit
841ea3620a
1 changed files with 5 additions and 4 deletions
|
|
@ -512,14 +512,15 @@ class MainFragment :
|
||||||
binding.queueSheet.coordinatorLayoutBehavior as QueueBottomSheetBehavior?
|
binding.queueSheet.coordinatorLayoutBehavior as QueueBottomSheetBehavior?
|
||||||
val exploreNavController = binding.exploreNavHost.findNavController()
|
val exploreNavController = binding.exploreNavHost.findNavController()
|
||||||
|
|
||||||
// TODO: Debug why this fails sometimes on the playback sheet
|
|
||||||
// TODO: Add playlist editing to enabled check
|
|
||||||
// TODO: Chain these listeners in some way instead of keeping them all here,
|
// TODO: Chain these listeners in some way instead of keeping them all here,
|
||||||
// assuming listeners added later have more priority
|
// assuming listeners added later have more priority
|
||||||
|
|
||||||
isEnabled =
|
isEnabled =
|
||||||
queueSheetBehavior?.state == BackportBottomSheetBehavior.STATE_EXPANDED ||
|
(queueSheetBehavior != null &&
|
||||||
playbackSheetBehavior.state == BackportBottomSheetBehavior.STATE_EXPANDED ||
|
queueSheetBehavior.state != BackportBottomSheetBehavior.STATE_COLLAPSED &&
|
||||||
|
playbackSheetBehavior.state == BackportBottomSheetBehavior.STATE_EXPANDED) ||
|
||||||
|
(playbackSheetBehavior.state != BackportBottomSheetBehavior.STATE_COLLAPSED &&
|
||||||
|
playbackSheetBehavior.state != BackportBottomSheetBehavior.STATE_HIDDEN) ||
|
||||||
detailModel.editedPlaylist.value != null ||
|
detailModel.editedPlaylist.value != null ||
|
||||||
selectionModel.selected.value.isNotEmpty() ||
|
selectionModel.selected.value.isNotEmpty() ||
|
||||||
exploreNavController.currentDestination?.id !=
|
exploreNavController.currentDestination?.id !=
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue