Back button now closes extensions sheet

This commit is contained in:
Jay 2020-03-11 00:50:27 -07:00
parent f2a45e5b53
commit ee471b919c

View File

@ -53,6 +53,7 @@ class CatalogueController : NucleusController<CataloguePresenter>(),
FlexibleAdapter.OnItemClickListener, FlexibleAdapter.OnItemClickListener,
CatalogueAdapter.OnBrowseClickListener, CatalogueAdapter.OnBrowseClickListener,
RootSearchInterface, RootSearchInterface,
CatalogueAdapter.OnLatestClickListener { CatalogueAdapter.OnLatestClickListener {
/** /**
@ -163,6 +164,14 @@ class CatalogueController : NucleusController<CataloguePresenter>(),
} }
override fun handleRootBack(): Boolean {
if (ext_bottom_sheet.sheetBehavior?.state != BottomSheetBehavior.STATE_COLLAPSED) {
ext_bottom_sheet.sheetBehavior?.state = BottomSheetBehavior.STATE_COLLAPSED
return true
}
return false
}
override fun onDestroyView(view: View) { override fun onDestroyView(view: View) {
adapter = null adapter = null
super.onDestroyView(view) super.onDestroyView(view)