mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-21 19:21:51 +01:00
Avoid crash in DeleteLibraryMangaDialog
No clue why it ever gets a -1 index though.
This commit is contained in:
parent
487622c592
commit
b12c7cf963
@ -64,9 +64,11 @@ fun DeleteLibraryMangaDialog(
|
|||||||
list.forEach { state ->
|
list.forEach { state ->
|
||||||
val onCheck = {
|
val onCheck = {
|
||||||
val index = list.indexOf(state)
|
val index = list.indexOf(state)
|
||||||
val mutableList = list.toMutableList()
|
if (index != -1) {
|
||||||
mutableList[index] = state.next() as CheckboxState.State<Int>
|
val mutableList = list.toMutableList()
|
||||||
list = mutableList.toList()
|
mutableList[index] = state.next() as CheckboxState.State<Int>
|
||||||
|
list = mutableList.toList()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
|
Loading…
Reference in New Issue
Block a user