Fix: crash in Updates tab due to possible duplicate headers

This commit is contained in:
Cuong-Tran 2025-04-15 00:08:08 +07:00
parent 04d90493d9
commit 438be9d942
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2

View file

@ -430,6 +430,12 @@ class UpdatesScreenModel(
}
listOf(header) + mangaItems
}
.distinctBy {
when (it) {
is UpdatesUiModel.Header -> it.hashCode()
is UpdatesUiModel.Item -> "${it.item.update.mangaId}-${it.item.update.chapterId}"
}
}
// KMK <--
}
}