优化 #5611
This commit is contained in:
@@ -310,6 +310,10 @@ abstract class BaseReadAloudService : BaseService(),
|
|||||||
@SuppressLint("WakelockTimeout")
|
@SuppressLint("WakelockTimeout")
|
||||||
@CallSuper
|
@CallSuper
|
||||||
open fun resumeReadAloud() {
|
open fun resumeReadAloud() {
|
||||||
|
resumeReadAloudInternal()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun resumeReadAloudInternal() {
|
||||||
pause = false
|
pause = false
|
||||||
needResumeOnAudioFocusGain = false
|
needResumeOnAudioFocusGain = false
|
||||||
needResumeOnCallStateIdle = false
|
needResumeOnCallStateIdle = false
|
||||||
@@ -677,14 +681,14 @@ abstract class BaseReadAloudService : BaseService(),
|
|||||||
|
|
||||||
open fun prevChapter() {
|
open fun prevChapter() {
|
||||||
toLast = false
|
toLast = false
|
||||||
|
resumeReadAloudInternal()
|
||||||
ReadBook.moveToPrevChapter(true, toLast = false)
|
ReadBook.moveToPrevChapter(true, toLast = false)
|
||||||
play()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
open fun nextChapter() {
|
open fun nextChapter() {
|
||||||
ReadBook.upReadTime()
|
ReadBook.upReadTime()
|
||||||
AppLog.putDebug("${ReadBook.curTextChapter?.chapter?.title} 朗读结束跳转下一章并朗读")
|
AppLog.putDebug("${ReadBook.curTextChapter?.chapter?.title} 朗读结束跳转下一章并朗读")
|
||||||
play()
|
resumeReadAloudInternal()
|
||||||
if (!ReadBook.moveToNextChapter(true)) {
|
if (!ReadBook.moveToNextChapter(true)) {
|
||||||
stopSelf()
|
stopSelf()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user