diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index 926bb24e30..56a9f8f7a6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -834,9 +834,12 @@ class LibraryController( } override fun showSheet() { - if (bottom_sheet.sheetBehavior?.state == BottomSheetBehavior.STATE_HIDDEN) bottom_sheet.sheetBehavior?.state = - BottomSheetBehavior.STATE_COLLAPSED - else bottom_sheet.sheetBehavior?.state = BottomSheetBehavior.STATE_EXPANDED + when { + bottom_sheet.sheetBehavior?.state == BottomSheetBehavior.STATE_HIDDEN -> bottom_sheet.sheetBehavior?.state = + BottomSheetBehavior.STATE_COLLAPSED + bottom_sheet.sheetBehavior?.state != BottomSheetBehavior.STATE_EXPANDED -> bottom_sheet.sheetBehavior?.state = BottomSheetBehavior.STATE_EXPANDED + else -> DisplayBottomSheet(this).show() + } } override fun toggleSheet() {