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) {
jumpToPosition()
}

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

Loading…
Cancel
Save