mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
1583f6c46c
commit
a74da4f968
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user