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