mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	Fix library settings sheet causing app to crash... (#5354)
...when the category list is empty
This commit is contained in:
		@@ -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()
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user