Fix global search

pull/26/head v0.5-rc3
Koitharu 6 years ago
parent d363869dab
commit 626bb20edb

@ -16,7 +16,7 @@ android {
minSdkVersion 21
targetSdkVersion 29
versionCode gitCommits
versionName '0.5-rc2'
versionName '0.5-rc3'
kapt {
arguments {

@ -18,7 +18,12 @@ class MangaSearchRepository : KoinComponent {
var isEmitted = false
for (source in sources) {
val list = lists.getOrPut(source) {
try {
MangaProviderFactory.create(source).getList(0, query, SortOrder.POPULARITY)
} catch (e: Throwable) {
e.printStackTrace()
emptyList<Manga>()
}
}
if (i < list.size) {
emit(list.subList(i, (i + batchSize).coerceAtMost(list.lastIndex)))

Loading…
Cancel
Save