Horis 2 years ago
parent
commit
bf2857aa5b

+ 5 - 2
app/src/main/java/io/legado/app/help/http/BackstageWebView.kt

@@ -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)
-            CookieStore.setCookie(it, cookie)
+            Coroutine.async(executeContext = IO) {
+                val cookie = CookieManager.getInstance().getCookie(url)
+                CookieStore.setCookie(it, cookie)
+            }
         }
         }
     }
     }
 
 

+ 1 - 0
app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt

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