Albirew/tachiyomi
Archivé
1
0
Bifurcation 0

Avoid crash in DeleteLibraryMangaDialog

No clue why it ever gets a -1 index though.

(cherry picked from commit b12c7cf963)
Cette révision appartient à :
arkon 2023-02-25 15:29:00 -05:00
Parent 08e6487a9a
révision 79323de326

Voir le fichier

@ -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(