优化
This commit is contained in:
@@ -292,8 +292,10 @@ abstract class BaseReadAloudService : BaseService(),
|
|||||||
readAloudNumber -= contentList[nowSpeak].length + 1 + paragraphStartPos
|
readAloudNumber -= contentList[nowSpeak].length + 1 + paragraphStartPos
|
||||||
paragraphStartPos = 0
|
paragraphStartPos = 0
|
||||||
textChapter?.let {
|
textChapter?.let {
|
||||||
val paragraphs = it.getParagraphs(readAloudByPage)
|
if (readAloudByPage) {
|
||||||
if (!paragraphs[nowSpeak].isParagraphEnd) readAloudNumber++
|
val paragraphs = it.getParagraphs(true)
|
||||||
|
if (!paragraphs[nowSpeak].isParagraphEnd) readAloudNumber++
|
||||||
|
}
|
||||||
if (readAloudNumber < it.getReadLength(pageIndex)) {
|
if (readAloudNumber < it.getReadLength(pageIndex)) {
|
||||||
pageIndex--
|
pageIndex--
|
||||||
ReadBook.moveToPrevPage()
|
ReadBook.moveToPrevPage()
|
||||||
@@ -314,8 +316,10 @@ abstract class BaseReadAloudService : BaseService(),
|
|||||||
paragraphStartPos = 0
|
paragraphStartPos = 0
|
||||||
nowSpeak++
|
nowSpeak++
|
||||||
textChapter?.let {
|
textChapter?.let {
|
||||||
val paragraphs = it.getParagraphs(readAloudByPage)
|
if (readAloudByPage) {
|
||||||
if (!paragraphs[nowSpeak].isParagraphEnd) readAloudNumber--
|
val paragraphs = it.getParagraphs(true)
|
||||||
|
if (!paragraphs[nowSpeak].isParagraphEnd) readAloudNumber--
|
||||||
|
}
|
||||||
if (readAloudNumber >= it.getReadLength(pageIndex + 1)) {
|
if (readAloudNumber >= it.getReadLength(pageIndex + 1)) {
|
||||||
pageIndex++
|
pageIndex++
|
||||||
ReadBook.moveToNextPage()
|
ReadBook.moveToNextPage()
|
||||||
|
|||||||
Reference in New Issue
Block a user