mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -25,10 +25,12 @@ import io.legado.app.ui.book.search.SearchActivity
|
||||
import io.legado.app.ui.main.bookshelf.BaseBookshelfFragment
|
||||
import io.legado.app.utils.*
|
||||
import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.flow.catch
|
||||
import kotlinx.coroutines.flow.conflate
|
||||
import kotlinx.coroutines.flow.flowOn
|
||||
import kotlinx.coroutines.flow.map
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlin.math.max
|
||||
@@ -138,7 +140,7 @@ class BookshelfFragment2 : BaseBookshelfFragment(R.layout.fragment_bookshelf1),
|
||||
it.durChapterTime
|
||||
}
|
||||
}
|
||||
}.catch {
|
||||
}.flowOn(Dispatchers.Default).catch {
|
||||
AppLog.put("书架更新出错", it)
|
||||
}.conflate().collect { list ->
|
||||
books = list
|
||||
|
||||
Reference in New Issue
Block a user