mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
18a7566e7d
commit
dbdabcbbb7
@ -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…
Reference in New Issue
Block a user