mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	Small new user improvements (#1143)
- Changed empty library string - Added empty view for Categories
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							0eae817aa6
						
					
				
				
					commit
					bdcc6e52e6
				
			@@ -107,9 +107,14 @@ class CategoryController : NucleusController<CategoryPresenter>(),
 | 
			
		||||
    fun setCategories(categories: List<CategoryItem>) {
 | 
			
		||||
        actionMode?.finish()
 | 
			
		||||
        adapter?.updateDataSet(categories)
 | 
			
		||||
        val selected = categories.filter { it.isSelected }
 | 
			
		||||
        if (selected.isNotEmpty()) {
 | 
			
		||||
            selected.forEach { onItemLongClick(categories.indexOf(it)) }
 | 
			
		||||
        if (categories.isNotEmpty()) {
 | 
			
		||||
            empty_view.hide()
 | 
			
		||||
            val selected = categories.filter { it.isSelected }
 | 
			
		||||
            if (selected.isNotEmpty()) {
 | 
			
		||||
                selected.forEach { onItemLongClick(categories.indexOf(it)) }
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
            empty_view.show(R.drawable.ic_shape_black_128dp, R.string.information_empty_category)
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user