|
|
@ -497,13 +497,15 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_boo |
|
|
|
page_view.upContent() |
|
|
|
page_view.upContent() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
observeEvent<Int>(Bus.TTS_START) { chapterStart -> |
|
|
|
observeEventSticky<Int>(Bus.TTS_START) { chapterStart -> |
|
|
|
launch(IO) { |
|
|
|
launch(IO) { |
|
|
|
ReadBook.curTextChapter?.let { |
|
|
|
if (BaseReadAloudService.isPlay()) { |
|
|
|
val pageStart = chapterStart - it.getReadLength(ReadBook.durPageIndex) |
|
|
|
ReadBook.curTextChapter?.let { |
|
|
|
it.page(ReadBook.durPageIndex)?.upPageAloudSpan(pageStart) |
|
|
|
val pageStart = chapterStart - it.getReadLength(ReadBook.durPageIndex) |
|
|
|
withContext(Main) { |
|
|
|
it.page(ReadBook.durPageIndex)?.upPageAloudSpan(pageStart) |
|
|
|
page_view.upContent() |
|
|
|
withContext(Main) { |
|
|
|
|
|
|
|
page_view.upContent() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|