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