朗读停止时上传进度

pull/737/head
gedoor 4 years ago
parent 09709d1b28
commit 1325f1e5ce
  1. 4
      app/src/main/java/io/legado/app/service/BaseReadAloudService.kt
  2. 2
      app/src/main/java/io/legado/app/service/help/ReadBook.kt
  3. 2
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt

@ -75,7 +75,7 @@ abstract class BaseReadAloudService : BaseService(),
postEvent(EventBus.ALOUD_STATE, Status.STOP)
upMediaSessionPlaybackState(PlaybackStateCompat.STATE_STOPPED)
mediaSessionCompat.release()
ReadBook.upProgress()
ReadBook.uploadProgress()
}
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
@ -141,7 +141,7 @@ abstract class BaseReadAloudService : BaseService(),
upNotification()
upMediaSessionPlaybackState(PlaybackStateCompat.STATE_PAUSED)
postEvent(EventBus.ALOUD_STATE, Status.PAUSE)
ReadBook.upProgress()
ReadBook.uploadProgress()
}
@CallSuper

@ -90,7 +90,7 @@ object ReadBook {
nextTextChapter = null
}
fun upProgress() {
fun uploadProgress() {
book?.let {
BookWebDav.uploadBookProgress(it)
}

@ -141,7 +141,7 @@ class ReadBookActivity : ReadBookBaseActivity(),
}
upSystemUiVisibility()
if (!BuildConfig.DEBUG) {
ReadBook.upProgress()
ReadBook.uploadProgress()
Backup.autoBack(this)
}
}

Loading…
Cancel
Save