This commit is contained in:
kunfei 2022-11-03 22:30:59 +08:00
parent 18a7566e7d
commit dbdabcbbb7
3 changed files with 17 additions and 1 deletions

View File

@ -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

View File

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

View File

@ -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) {
}