Fix library settings sheet causing app to crash... (#5354)
...when the category list is empty (cherry picked from commit 8791b72cb1ebdd4b803bbd7d7828630f82fe8a9f)
This commit is contained in:
parent
0521c362c9
commit
0bdddb365f
@ -297,9 +297,13 @@ class LibraryController(
|
||||
}
|
||||
|
||||
fun showSettingsSheet() {
|
||||
if (adapter?.categories?.isNotEmpty() == true) {
|
||||
adapter?.categories?.get(binding.libraryPager.currentItem)?.let { category ->
|
||||
settingsSheet?.show(category)
|
||||
}
|
||||
} else {
|
||||
settingsSheet?.show()
|
||||
}
|
||||
}
|
||||
|
||||
fun onNextLibraryUpdate(categories: List<Category>, mangaMap: Map<Int, List<LibraryItem>>) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user