Fix global search
This commit is contained in:
@@ -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) {
|
||||
MangaProviderFactory.create(source).getList(0, query, SortOrder.POPULARITY)
|
||||
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)))
|
||||
|
||||
Reference in New Issue
Block a user