优化
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user