fix bulk selection continuously adding mangas to the list even though they are added

This commit is contained in:
Cuong-Tran 2024-10-19 17:33:17 +07:00
parent 5a458ac39c
commit 7b37d1cf0e
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2

View file

@ -98,7 +98,7 @@ class BulkFavoriteScreenModel(
val newSelection = state.selection.mutate { list ->
if (toSelectedState != true && list.fastAny { it.id == manga.id }) {
list.removeAll { it.id == manga.id }
} else if (toSelectedState != false) {
} else if (toSelectedState != false && list.none { it.id == manga.id }) {
list.add(manga)
}
}