chore: rename EventBus.BOOK_URL_CHANGED

This commit is contained in:
Xwite 2022-10-01 09:11:22 +08:00 committed by Xwite
parent e6f431a139
commit 6433d17a68
3 changed files with 3 additions and 3 deletions

View File

@ -28,6 +28,6 @@ object EventBus {
const val TIP_COLOR = "tipColor"
const val SOURCE_CHANGED = "sourceChanged"
const val SEARCH_RESULT = "searchResult"
const val BOOK_URL_CHANGED = "bookUrlChanged"
const val FILE_SOURCE_DOWNLOAD_DONE = "fileSourceDownloadDone"
const val updateReadActionBar = "updateReadActionBar"
}

View File

@ -66,7 +66,7 @@ class ImportOnLineBookFileViewModel(app: Application) : BaseViewModel(app) {
fun importOnLineBookFile(url: String, fileName: String, success: () -> Unit) {
execute {
LocalBook.importFileOnLine(url, fileName, bookSource).let {
postEvent(EventBus.BOOK_URL_CHANGED, it.bookUrl)
postEvent(EventBus.FILE_SOURCE_DOWNLOAD_DONE, it.bookUrl)
}
}.onSuccess {
success.invoke()

View File

@ -535,7 +535,7 @@ class BookInfoActivity :
}
override fun observeLiveBus() {
observeEvent<String>(EventBus.BOOK_URL_CHANGED) {
observeEvent<String>(EventBus.FILE_SOURCE_DOWNLOAD_DONE) {
viewModel.changeToLocalBook(it)
}
}