mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
朗读暂停时,下一章现在会自动开始播放; 修复朗读暂停时直接下一章/段,系统媒体控件还保留在暂停状态的问题 (#5105)
This commit is contained in:
@@ -285,6 +285,7 @@ abstract class BaseReadAloudService : BaseService(),
|
||||
needResumeOnAudioFocusGain = false
|
||||
needResumeOnCallStateIdle = false
|
||||
upReadAloudNotification()
|
||||
upMediaSessionPlaybackState(PlaybackStateCompat.STATE_PLAYING)
|
||||
postEvent(EventBus.ALOUD_STATE, Status.PLAY)
|
||||
}
|
||||
|
||||
@@ -664,11 +665,13 @@ abstract class BaseReadAloudService : BaseService(),
|
||||
open fun prevChapter() {
|
||||
toLast = false
|
||||
ReadBook.moveToPrevChapter(true, toLast = false)
|
||||
play()
|
||||
}
|
||||
|
||||
open fun nextChapter() {
|
||||
ReadBook.upReadTime()
|
||||
AppLog.putDebug("${ReadBook.curTextChapter?.chapter?.title} 朗读结束跳转下一章并朗读")
|
||||
play()
|
||||
if (!ReadBook.moveToNextChapter(true)) {
|
||||
stopSelf()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user