Handle manga info fetch errors in the same way as chapter fetch errors (#1541)

(Using a toast)
This commit is contained in:
FlaminSarge 2018-09-21 00:51:37 -07:00 committed by inorichi
parent 353ccbd444
commit 3611f67fb4
2 changed files with 3 additions and 4 deletions

View File

@ -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)
}
/**

View File

@ -90,9 +90,7 @@ class MangaInfoPresenter(
.doOnNext { sendMangaToView() }
.subscribeFirst({ view, _ ->
view.onFetchMangaDone()
}, { view, _ ->
view.onFetchMangaError()
})
}, MangaInfoController::onFetchMangaError)
}
/**