mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -29,4 +29,5 @@ object EventBus {
|
||||
const val SOURCE_CHANGED = "sourceChanged"
|
||||
const val SEARCH_RESULT = "searchResult"
|
||||
const val BOOK_URL_CHANGED = "bookUrlChanged"
|
||||
const val updateReadActionBar = "updateReadActionBar"
|
||||
}
|
||||
@@ -127,5 +127,5 @@ object PreferKey {
|
||||
const val bgImageNBlurring = "backgroundImageNightBlurring"
|
||||
const val showReadTitleAddition = "showReadTitleAddition"
|
||||
const val readBarStyleFollowPage = "readBarStyleFollowPage"
|
||||
const val updateReadActionBar = "updateReadActionBar"
|
||||
|
||||
}
|
||||
|
||||
@@ -1261,7 +1261,7 @@ class ReadBookActivity : BaseReadBookActivity(),
|
||||
observeEvent<List<SearchResult>>(EventBus.SEARCH_RESULT) {
|
||||
viewModel.searchResultList = it
|
||||
}
|
||||
observeEvent<Boolean>(PreferKey.updateReadActionBar){
|
||||
observeEvent<Boolean>(EventBus.updateReadActionBar) {
|
||||
binding.readMenu.reset()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ class MoreConfigDialog : DialogFragment() {
|
||||
}
|
||||
PreferKey.showReadTitleAddition,
|
||||
PreferKey.readBarStyleFollowPage -> {
|
||||
postEvent(PreferKey.updateReadActionBar,true)
|
||||
postEvent(EventBus.updateReadActionBar, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user