mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -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) {
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user