优化
This commit is contained in:
@@ -16,6 +16,7 @@ import io.legado.app.exception.NoStackTraceException
|
|||||||
import io.legado.app.help.config.AppConfig
|
import io.legado.app.help.config.AppConfig
|
||||||
import io.legado.app.help.coroutine.Coroutine
|
import io.legado.app.help.coroutine.Coroutine
|
||||||
import io.legado.app.utils.runOnUI
|
import io.legado.app.utils.runOnUI
|
||||||
|
import kotlinx.coroutines.Dispatchers.IO
|
||||||
import kotlinx.coroutines.Runnable
|
import kotlinx.coroutines.Runnable
|
||||||
import kotlinx.coroutines.suspendCancellableCoroutine
|
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||||
import kotlinx.coroutines.withTimeout
|
import kotlinx.coroutines.withTimeout
|
||||||
@@ -131,8 +132,10 @@ class BackstageWebView(
|
|||||||
|
|
||||||
private fun setCookie(url: String) {
|
private fun setCookie(url: String) {
|
||||||
tag?.let {
|
tag?.let {
|
||||||
val cookie = CookieManager.getInstance().getCookie(url)
|
Coroutine.async(executeContext = IO) {
|
||||||
CookieStore.setCookie(it, cookie)
|
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.setEdgeEffectColor(primaryColor)
|
||||||
binding.recyclerView.addItemDecoration(VerticalDivider(this))
|
binding.recyclerView.addItemDecoration(VerticalDivider(this))
|
||||||
binding.recyclerView.adapter = adapter
|
binding.recyclerView.adapter = adapter
|
||||||
|
binding.recyclerView.recycledViewPool.setMaxRecycledViews(0, 15)
|
||||||
// When this page is opened, it is in selection mode
|
// When this page is opened, it is in selection mode
|
||||||
val dragSelectTouchHelper =
|
val dragSelectTouchHelper =
|
||||||
DragSelectTouchHelper(adapter.dragSelectCallback).setSlideArea(16, 50)
|
DragSelectTouchHelper(adapter.dragSelectCallback).setSlideArea(16, 50)
|
||||||
|
|||||||
Reference in New Issue
Block a user