Sfoglia il codice sorgente

fix webdav init block main thread

821938089 4 anni fa
parent
commit
fbecc2333e
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      app/src/main/java/io/legado/app/model/ReadBook.kt

+ 3 - 1
app/src/main/java/io/legado/app/model/ReadBook.kt

@@ -107,7 +107,9 @@ object ReadBook : CoroutineScope by MainScope() {
 
     fun uploadProgress() {
         book?.let {
-            AppWebDav.uploadBookProgress(it)
+            Coroutine.async {
+                AppWebDav.uploadBookProgress(it)
+            }
         }
     }