pull/1502/head
gedoor 3 years ago
parent 69979321bc
commit c20b2b3cc9
  1. 2
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
  2. 4
      app/src/main/java/io/legado/app/ui/book/read/SearchMenu.kt

@ -938,7 +938,7 @@ class ReadBookActivity : BaseReadBookActivity(),
} }
} }
if (previousResult.chapterIndex != searchResult.chapterIndex) { if (searchResult.chapterIndex != previousResult?.chapterIndex) {
viewModel.openChapter(searchResult.chapterIndex) { viewModel.openChapter(searchResult.chapterIndex) {
jumpToPosition() jumpToPosition()
} }

@ -46,8 +46,8 @@ class SearchMenu @JvmOverloads constructor(
get() = searchResultList.isNotEmpty() get() = searchResultList.isNotEmpty()
val selectedSearchResult: SearchResult? val selectedSearchResult: SearchResult?
get() = searchResultList.getOrNull(currentSearchResultIndex) get() = searchResultList.getOrNull(currentSearchResultIndex)
val previousSearchResult: SearchResult val previousSearchResult: SearchResult?
get() = searchResultList[lastSearchResultIndex] get() = searchResultList.getOrNull(lastSearchResultIndex)
init { init {
initAnimation() initAnimation()

Loading…
Cancel
Save