Handle manga info fetch errors in the same way as chapter fetch errors (#1541)
(Using a toast)
This commit is contained in:
parent
353ccbd444
commit
3611f67fb4
2 changed files with 3 additions and 4 deletions
|
@ -355,8 +355,9 @@ class MangaInfoController : NucleusController<MangaInfoPresenter>(),
|
|||
/**
|
||||
* Update swipe refresh to start showing refresh in progress spinner.
|
||||
*/
|
||||
fun onFetchMangaError() {
|
||||
fun onFetchMangaError(error: Throwable) {
|
||||
setRefreshing(false)
|
||||
activity?.toast(error.message)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -90,9 +90,7 @@ class MangaInfoPresenter(
|
|||
.doOnNext { sendMangaToView() }
|
||||
.subscribeFirst({ view, _ ->
|
||||
view.onFetchMangaDone()
|
||||
}, { view, _ ->
|
||||
view.onFetchMangaError()
|
||||
})
|
||||
}, MangaInfoController::onFetchMangaError)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Reference in a new issue