Misc small fixes

This commit is contained in:
Koitharu
2021-02-19 20:21:44 +02:00
parent 69e44b10e9
commit 0dfba47d85
7 changed files with 23 additions and 12 deletions

View File

@@ -28,13 +28,8 @@ class TrackingRepository(
}
val tracks = db.tracksDao.findAll().groupBy { it.mangaId }
return mangaList
.mapNotNull {
if (it.source == MangaSource.LOCAL) {
localMangaRepository.getRemoteManga(it)
} else {
it
}
}.distinctBy { it.id }
.filterNot { it.source == MangaSource.LOCAL }
.distinctBy { it.id }
.map { manga ->
val track = tracks[manga.id]?.singleOrNull()
MangaTracking(