Horis há 3 anos atrás
pai
commit
5f1b10c46d

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

@@ -237,7 +237,7 @@ object ReadBook : CoroutineScope by MainScope() {
     private fun curPageChanged() {
     private fun curPageChanged() {
         callBack?.pageChanged()
         callBack?.pageChanged()
         if (BaseReadAloudService.isRun) {
         if (BaseReadAloudService.isRun) {
-            ReadAloud.playByEventBus(!BaseReadAloudService.pause)
+            readAloud(!BaseReadAloudService.pause)
         }
         }
         upReadTime()
         upReadTime()
         preDownload()
         preDownload()

+ 1 - 1
app/src/main/java/io/legado/app/service/BaseReadAloudService.kt

@@ -138,7 +138,7 @@ abstract class BaseReadAloudService : BaseService(),
             IntentAction.nextParagraph -> nextP()
             IntentAction.nextParagraph -> nextP()
             IntentAction.addTimer -> addTimer()
             IntentAction.addTimer -> addTimer()
             IntentAction.setTimer -> setTimer(intent.getIntExtra("minute", 0))
             IntentAction.setTimer -> setTimer(intent.getIntExtra("minute", 0))
-            else -> stopSelf()
+            IntentAction.stop -> stopSelf()
         }
         }
         return super.onStartCommand(intent, flags, startId)
         return super.onStartCommand(intent, flags, startId)
     }
     }