Avoid crash in DeleteLibraryMangaDialog
No clue why it ever gets a -1 index though. (cherry picked from commit b12c7cf9633a9fc3a728a0ef44b5d50d621a7595) (cherry picked from commit e9083fc5711e65a8716d4f50e9f2fd8c35793f7d)
This commit is contained in:
parent
ea0483e4aa
commit
7f9848db99
@ -64,9 +64,11 @@ fun DeleteLibraryMangaDialog(
|
||||
list.forEach { state ->
|
||||
val onCheck = {
|
||||
val index = list.indexOf(state)
|
||||
val mutableList = list.toMutableList()
|
||||
mutableList[index] = state.next() as CheckboxState.State<Int>
|
||||
list = mutableList.toList()
|
||||
if (index != -1) {
|
||||
val mutableList = list.toMutableList()
|
||||
mutableList[index] = state.next() as CheckboxState.State<Int>
|
||||
list = mutableList.toList()
|
||||
}
|
||||
}
|
||||
|
||||
Row(
|
||||
|
Loading…
x
Reference in New Issue
Block a user