pull/2268/head
kunfei 2 years ago
parent 0f663af2fd
commit 41be2d381e
  1. 1
      app/src/main/java/io/legado/app/constant/EventBus.kt
  2. 2
      app/src/main/java/io/legado/app/constant/PreferKey.kt
  3. 2
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
  4. 2
      app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt

@ -29,4 +29,5 @@ object EventBus {
const val SOURCE_CHANGED = "sourceChanged" const val SOURCE_CHANGED = "sourceChanged"
const val SEARCH_RESULT = "searchResult" const val SEARCH_RESULT = "searchResult"
const val BOOK_URL_CHANGED = "bookUrlChanged" const val BOOK_URL_CHANGED = "bookUrlChanged"
const val updateReadActionBar = "updateReadActionBar"
} }

@ -127,5 +127,5 @@ object PreferKey {
const val bgImageNBlurring = "backgroundImageNightBlurring" const val bgImageNBlurring = "backgroundImageNightBlurring"
const val showReadTitleAddition = "showReadTitleAddition" const val showReadTitleAddition = "showReadTitleAddition"
const val readBarStyleFollowPage = "readBarStyleFollowPage" const val readBarStyleFollowPage = "readBarStyleFollowPage"
const val updateReadActionBar = "updateReadActionBar"
} }

@ -1261,7 +1261,7 @@ class ReadBookActivity : BaseReadBookActivity(),
observeEvent<List<SearchResult>>(EventBus.SEARCH_RESULT) { observeEvent<List<SearchResult>>(EventBus.SEARCH_RESULT) {
viewModel.searchResultList = it viewModel.searchResultList = it
} }
observeEvent<Boolean>(PreferKey.updateReadActionBar){ observeEvent<Boolean>(EventBus.updateReadActionBar) {
binding.readMenu.reset() binding.readMenu.reset()
} }
} }

@ -135,7 +135,7 @@ class MoreConfigDialog : DialogFragment() {
} }
PreferKey.showReadTitleAddition, PreferKey.showReadTitleAddition,
PreferKey.readBarStyleFollowPage -> { PreferKey.readBarStyleFollowPage -> {
postEvent(PreferKey.updateReadActionBar,true) postEvent(EventBus.updateReadActionBar, true)
} }
} }
} }

Loading…
Cancel
Save