|
|
@ -781,10 +781,11 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_boo |
|
|
|
val query = data.getStringExtra("query") |
|
|
|
val query = data.getStringExtra("query") |
|
|
|
viewModel.openChapter(index) |
|
|
|
viewModel.openChapter(index) |
|
|
|
// block until load correct chapter and pages |
|
|
|
// block until load correct chapter and pages |
|
|
|
while (ReadBook.durChapterIndex != index || ReadBook.curTextChapter?.pages == null ){ |
|
|
|
var pages = ReadBook.curTextChapter?.pages |
|
|
|
|
|
|
|
while (ReadBook.durChapterIndex != index || pages == null ){ |
|
|
|
delay(100L) |
|
|
|
delay(100L) |
|
|
|
|
|
|
|
pages = ReadBook.curTextChapter?.pages |
|
|
|
} |
|
|
|
} |
|
|
|
val pages = ReadBook.curTextChapter?.pages |
|
|
|
|
|
|
|
val positions = ReadBook.searchResultPositions(pages, indexWithinChapter, query!!) |
|
|
|
val positions = ReadBook.searchResultPositions(pages, indexWithinChapter, query!!) |
|
|
|
//todo: show selected text |
|
|
|
//todo: show selected text |
|
|
|
val job1 = async(Main){ |
|
|
|
val job1 = async(Main){ |
|
|
|