Fix back closing the app when dl/extensions sheet is still expanding up

This commit is contained in:
Jays2Kings 2021-04-07 18:29:31 -04:00
parent 04ab0d37ea
commit 1fe46ef475
2 changed files with 2 additions and 2 deletions

View File

@ -276,7 +276,7 @@ class RecentsController(bundle: Bundle? = null) :
}
override fun handleSheetBack(): Boolean {
if (binding.downloadBottomSheet.dlBottomSheet.sheetBehavior?.state == BottomSheetBehavior.STATE_EXPANDED) {
if (showingDownloads) {
binding.downloadBottomSheet.dlBottomSheet.dismiss()
return true
}

View File

@ -318,7 +318,7 @@ class BrowseController :
override fun sheetIsExpanded(): Boolean = binding.bottomSheet.root.sheetBehavior.isExpanded()
override fun handleSheetBack(): Boolean {
if (!binding.bottomSheet.root.sheetBehavior.isCollapsed()) {
if (showingExtensions) {
if (binding.bottomSheet.root.canGoBack()) {
binding.bottomSheet.root.sheetBehavior?.collapse()
}