pull/1603/head
kunfei 3 years ago
parent 1583f6c46c
commit a74da4f968
  1. 8
      app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt

@ -229,10 +229,7 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
else -> { else -> {
appDb.bookSourceDao.flowSearch("%$searchKey%") appDb.bookSourceDao.flowSearch("%$searchKey%")
} }
} }.collect { data ->
}.onFailure {
AppLog.put("更新书源出错", it)
}.getOrNull()?.collect { data ->
val sourceList = val sourceList =
if (sortAscending) when (sort) { if (sortAscending) when (sort) {
Sort.Weight -> data.sortedBy { it.weight } Sort.Weight -> data.sortedBy { it.weight }
@ -270,6 +267,9 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
} }
adapter.setItems(sourceList, adapter.diffItemCallback) adapter.setItems(sourceList, adapter.diffItemCallback)
} }
}.onFailure {
AppLog.put("更新书源出错", it)
}
} }
} }

Loading…
Cancel
Save