mirror of
https://github.com/gedoor/legado.git
synced 2025-01-08 11:47:32 +08:00
优化
This commit is contained in:
parent
4b1abcd8ba
commit
d627e7452a
@ -16,6 +16,7 @@ import io.legado.app.exception.NoStackTraceException
|
||||
import io.legado.app.help.config.AppConfig
|
||||
import io.legado.app.help.coroutine.Coroutine
|
||||
import io.legado.app.utils.runOnUI
|
||||
import kotlinx.coroutines.Dispatchers.IO
|
||||
import kotlinx.coroutines.Runnable
|
||||
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||
import kotlinx.coroutines.withTimeout
|
||||
@ -131,8 +132,10 @@ class BackstageWebView(
|
||||
|
||||
private fun setCookie(url: String) {
|
||||
tag?.let {
|
||||
val cookie = CookieManager.getInstance().getCookie(url)
|
||||
CookieStore.setCookie(it, cookie)
|
||||
Coroutine.async(executeContext = IO) {
|
||||
val cookie = CookieManager.getInstance().getCookie(url)
|
||||
CookieStore.setCookie(it, cookie)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -277,6 +277,7 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
|
||||
binding.recyclerView.setEdgeEffectColor(primaryColor)
|
||||
binding.recyclerView.addItemDecoration(VerticalDivider(this))
|
||||
binding.recyclerView.adapter = adapter
|
||||
binding.recyclerView.recycledViewPool.setMaxRecycledViews(0, 15)
|
||||
// When this page is opened, it is in selection mode
|
||||
val dragSelectTouchHelper =
|
||||
DragSelectTouchHelper(adapter.dragSelectCallback).setSlideArea(16, 50)
|
||||
|
Loading…
Reference in New Issue
Block a user