Fixed drop down in title showing up unintended

This commit is contained in:
Jay 2020-05-03 12:52:36 -04:00
parent 570c6abf07
commit 5f78765ef6

View File

@ -502,7 +502,9 @@ class LibraryController(
LibraryUpdateService.setListener(this) LibraryUpdateService.setListener(this)
recycler_cover.isClickable = false recycler_cover.isClickable = false
recycler_cover.isFocusable = false recycler_cover.isFocusable = false
if (onRoot) {
activity?.dropdown?.visibleIf(!singleCategory) activity?.dropdown?.visibleIf(!singleCategory)
}
} else { } else {
closeTip() closeTip()
activity?.dropdown?.gone() activity?.dropdown?.gone()
@ -552,7 +554,9 @@ class LibraryController(
recycler.itemAnimator = DefaultItemAnimator() recycler.itemAnimator = DefaultItemAnimator()
} }
singleCategory = presenter.categories.size <= 1 singleCategory = presenter.categories.size <= 1
if (onRoot) {
activity?.dropdown?.visibleIf(!singleCategory) activity?.dropdown?.visibleIf(!singleCategory)
}
progress.gone() progress.gone()
if (!freshStart) { if (!freshStart) {
justStarted = false justStarted = false
@ -571,6 +575,7 @@ class LibraryController(
adapter.isLongPressDragEnabled = canDrag() adapter.isLongPressDragEnabled = canDrag()
category_recycler.setCategories(presenter.categories) category_recycler.setCategories(presenter.categories)
setActiveCategory() setActiveCategory()
if (onRoot) {
activity?.toolbar?.setOnClickListener { activity?.toolbar?.setOnClickListener {
val recycler = recycler ?: return@setOnClickListener val recycler = recycler ?: return@setOnClickListener
if (singleCategory) { if (singleCategory) {
@ -580,6 +585,7 @@ class LibraryController(
} }
} }
} }
}
private fun showCategories(show: Boolean) { private fun showCategories(show: Boolean) {
recycler_cover.isClickable = show recycler_cover.isClickable = show