This commit is contained in:
Horis 2024-08-29 22:09:49 +08:00
parent 4b1abcd8ba
commit d627e7452a
2 changed files with 6 additions and 2 deletions

View File

@ -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)
}
}
}

View File

@ -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)