mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 18:31:51 +01:00
Fix library settings sheet causing app to crash... (#5354)
...when the category list is empty
This commit is contained in:
parent
d961492380
commit
8791b72cb1
@ -262,9 +262,13 @@ class LibraryController(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun showSettingsSheet() {
|
fun showSettingsSheet() {
|
||||||
|
if (adapter?.categories?.isNotEmpty() == true) {
|
||||||
adapter?.categories?.get(binding.libraryPager.currentItem)?.let { category ->
|
adapter?.categories?.get(binding.libraryPager.currentItem)?.let { category ->
|
||||||
settingsSheet?.show(category)
|
settingsSheet?.show(category)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
settingsSheet?.show()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onNextLibraryUpdate(categories: List<Category>, mangaMap: Map<Int, List<LibraryItem>>) {
|
fun onNextLibraryUpdate(categories: List<Category>, mangaMap: Map<Int, List<LibraryItem>>) {
|
||||||
|
Loading…
Reference in New Issue
Block a user