Tapping category name now expands backdrop
This commit is contained in:
parent
a03ee4943f
commit
511fa31798
3 changed files with 5 additions and 2 deletions
|
@ -210,6 +210,7 @@ class LibraryCategoryAdapter(val controller: LibraryController) :
|
|||
fun startReading(position: Int)
|
||||
fun onItemReleased(position: Int)
|
||||
fun canDrag(): Boolean
|
||||
fun openCategoriesBackdrop()
|
||||
fun updateCategory(catId: Int): Boolean
|
||||
fun sortCategory(catId: Int, sortBy: Int)
|
||||
fun selectAll(position: Int)
|
||||
|
|
|
@ -1113,6 +1113,8 @@ class LibraryController(
|
|||
}
|
||||
}
|
||||
|
||||
override fun openCategoriesBackdrop() = showCategories(true)
|
||||
|
||||
override fun updateCategory(catId: Int): Boolean {
|
||||
val category = (adapter.getItem(catId) as? LibraryHeaderItem)?.category ?: return false
|
||||
val inQueue = LibraryUpdateService.categoryInQueue(category.id)
|
||||
|
|
|
@ -45,7 +45,7 @@ class LibraryHeaderHolder(val view: View, private val adapter: LibraryCategoryAd
|
|||
adapter.libraryListener.manageCategory(adapterPosition)
|
||||
true
|
||||
}
|
||||
sectionText.setOnClickListener { toggleCategory() }
|
||||
sectionText.setOnClickListener { adapter.libraryListener.openCategoriesBackdrop() }
|
||||
sortText.setOnClickListener { it.post { showCatSortOptions() } }
|
||||
checkboxImage.setOnClickListener { selectAll() }
|
||||
updateButton.drawable.mutate()
|
||||
|
|
Reference in a new issue