pull/2533/head
kunfei 2 years ago
parent 18a7566e7d
commit dbdabcbbb7
  1. 6
      app/src/main/java/io/legado/app/model/AudioPlay.kt
  2. 2
      app/src/main/java/io/legado/app/ui/book/audio/AudioPlayActivity.kt
  3. 10
      app/src/main/java/io/legado/app/ui/book/audio/TimerSliderPopup.kt

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

@ -164,7 +164,7 @@ class AudioPlayActivity :
}
binding.ivTimer.setOnClickListener {
if (AudioPlayService.isRun) {
AudioPlay.addTimer(this)
} else {
toastOnUi(R.string.cannot_timed_non_playback)
}

@ -0,0 +1,10 @@
package io.legado.app.ui.book.audio
import android.view.ViewGroup
import android.widget.PopupWindow
class TimerSliderPopup :
PopupWindow(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT) {
}
Loading…
Cancel
Save