优化
This commit is contained in:
@@ -27,6 +27,7 @@ import io.legado.app.R
|
|||||||
import io.legado.app.base.BaseService
|
import io.legado.app.base.BaseService
|
||||||
import io.legado.app.constant.AppConst
|
import io.legado.app.constant.AppConst
|
||||||
import io.legado.app.constant.AppLog
|
import io.legado.app.constant.AppLog
|
||||||
|
import io.legado.app.constant.AppPattern
|
||||||
import io.legado.app.constant.EventBus
|
import io.legado.app.constant.EventBus
|
||||||
import io.legado.app.constant.IntentAction
|
import io.legado.app.constant.IntentAction
|
||||||
import io.legado.app.constant.NotificationId
|
import io.legado.app.constant.NotificationId
|
||||||
@@ -326,9 +327,11 @@ abstract class BaseReadAloudService : BaseService(),
|
|||||||
private fun prevP() {
|
private fun prevP() {
|
||||||
if (nowSpeak > 0) {
|
if (nowSpeak > 0) {
|
||||||
playStop()
|
playStop()
|
||||||
|
do {
|
||||||
nowSpeak--
|
nowSpeak--
|
||||||
readAloudNumber -= contentList[nowSpeak].length + 1 + paragraphStartPos
|
readAloudNumber -= contentList[nowSpeak].length + 1 + paragraphStartPos
|
||||||
paragraphStartPos = 0
|
paragraphStartPos = 0
|
||||||
|
} while (contentList[nowSpeak].matches(AppPattern.notReadAloudRegex))
|
||||||
textChapter?.let {
|
textChapter?.let {
|
||||||
if (readAloudByPage) {
|
if (readAloudByPage) {
|
||||||
val paragraphs = it.getParagraphs(true)
|
val paragraphs = it.getParagraphs(true)
|
||||||
|
|||||||
Reference in New Issue
Block a user