pull/525/head
gedoor 4 years ago
parent 41980888ea
commit a9e538572d
  1. 6
      app/src/main/java/io/legado/app/service/help/AudioPlay.kt
  2. 3
      app/src/main/java/io/legado/app/ui/audio/AudioPlayActivity.kt

@ -131,6 +131,12 @@ object AudioPlay {
}
}
fun addTimer(context: Context) {
val intent = Intent(context, AudioPlayService::class.java)
intent.action = IntentAction.addTimer
context.startService(intent)
}
fun saveRead() {
Coroutine.async {
book?.let { book ->

@ -115,6 +115,9 @@ class AudioPlayActivity :
binding.ivFastRewind.onClick {
AudioPlay.adjustSpeed(this, -0.1f)
}
binding.ivTimer.onClick {
AudioPlay.addTimer(this)
}
}
private fun upCover(path: String?) {

Loading…
Cancel
Save