Upgrade plugins

This commit is contained in:
Koitharu
2022-09-21 18:54:18 +03:00
parent 1e75edf262
commit bcd891d653
3 changed files with 6 additions and 5 deletions

View File

@@ -70,13 +70,14 @@ class LocalMangaRepository @Inject constructor(private val storageManager: Local
if (!tags.isNullOrEmpty()) {
list.retainAll { x -> x.containsTags(tags) }
}
@Suppress("NON_EXHAUSTIVE_WHEN_STATEMENT")
when (sortOrder) {
SortOrder.ALPHABETICAL -> list.sortWith(compareBy(AlphanumComparator()) { x -> x.manga.title })
SortOrder.RATING -> list.sortByDescending { it.manga.rating }
SortOrder.NEWEST,
SortOrder.UPDATED,
-> list.sortByDescending { it.createdAt }
else -> Unit
}
return list.unwrap()
}