mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05: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
1 changed files with 6 additions and 2 deletions
|
@ -262,8 +262,12 @@ class LibraryController(
|
|||
}
|
||||
|
||||
fun showSettingsSheet() {
|
||||
adapter?.categories?.get(binding.libraryPager.currentItem)?.let { category ->
|
||||
settingsSheet?.show(category)
|
||||
if (adapter?.categories?.isNotEmpty() == true) {
|
||||
adapter?.categories?.get(binding.libraryPager.currentItem)?.let { category ->
|
||||
settingsSheet?.show(category)
|
||||
}
|
||||
} else {
|
||||
settingsSheet?.show()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue