Horis 1 år sedan
förälder
incheckning
45d631c1b7
1 ändrade filer med 4 tillägg och 2 borttagningar
  1. 4 2
      app/src/main/java/io/legado/app/model/CacheBook.kt

+ 4 - 2
app/src/main/java/io/legado/app/model/CacheBook.kt

@@ -89,8 +89,10 @@ object CacheBook {
     }
     }
 
 
     fun stop(context: Context) {
     fun stop(context: Context) {
-        context.startService<CacheBookService> {
-            action = IntentAction.stop
+        if (CacheBookService.isRun) {
+            context.startService<CacheBookService> {
+                action = IntentAction.stop
+            }
         }
         }
     }
     }