mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	Fix chapter list selection uninverting (closes #3014)
This commit is contained in:
		@@ -139,6 +139,7 @@ class ChaptersController :
 | 
			
		||||
            val coordinates = binding.fab.getCoordinates()
 | 
			
		||||
            binding.revealView.hideRevealEffect(coordinates.x, coordinates.y, 1920)
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        super.onActivityResumed(activity)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -457,9 +458,13 @@ class ChaptersController :
 | 
			
		||||
 | 
			
		||||
    private fun selectInverse() {
 | 
			
		||||
        val adapter = adapter ?: return
 | 
			
		||||
 | 
			
		||||
        selectedItems.clear()
 | 
			
		||||
        for (i in 0..adapter.itemCount) {
 | 
			
		||||
            adapter.toggleSelection(i)
 | 
			
		||||
        }
 | 
			
		||||
        selectedItems.addAll(adapter.selectedPositions.mapNotNull { adapter.getItem(it) })
 | 
			
		||||
 | 
			
		||||
        actionMode?.invalidate()
 | 
			
		||||
        adapter.notifyDataSetChanged()
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -265,9 +265,6 @@ class UpdatesController :
 | 
			
		||||
        presenter.deleteChapters(chaptersToDelete)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Destory [ActionMode] if it's shown
 | 
			
		||||
     */
 | 
			
		||||
    private fun destroyActionModeIfNeeded() {
 | 
			
		||||
        actionMode?.finish()
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user