pull/49/head
kunfei 5 years ago
parent c002d01137
commit ade80d3f34
  1. 4
      app/src/main/java/io/legado/app/service/BaseReadAloudService.kt
  2. 2
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt

@ -37,6 +37,10 @@ abstract class BaseReadAloudService : BaseService(),
var isRun = false
var timeMinute: Int = 0
var pause = false
fun isPlay(): Boolean {
return isRun && !pause
}
}
private val handler = Handler()

@ -214,7 +214,7 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_boo
&& event.isTracking
&& !event.isCanceled
) {
if (!BaseReadAloudService.pause) {
if (BaseReadAloudService.isPlay()) {
ReadAloud.pause(this)
toast(R.string.read_aloud_pause)
return true

Loading…
Cancel
Save