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
@ -355,8 +355,9 @@ class MangaInfoController : NucleusController<MangaInfoPresenter>(),
|
|||||||
/**
|
/**
|
||||||
* Update swipe refresh to start showing refresh in progress spinner.
|
* Update swipe refresh to start showing refresh in progress spinner.
|
||||||
*/
|
*/
|
||||||
fun onFetchMangaError() {
|
fun onFetchMangaError(error: Throwable) {
|
||||||
setRefreshing(false)
|
setRefreshing(false)
|
||||||
|
activity?.toast(error.message)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -90,9 +90,7 @@ class MangaInfoPresenter(
|
|||||||
.doOnNext { sendMangaToView() }
|
.doOnNext { sendMangaToView() }
|
||||||
.subscribeFirst({ view, _ ->
|
.subscribeFirst({ view, _ ->
|
||||||
view.onFetchMangaDone()
|
view.onFetchMangaDone()
|
||||||
}, { view, _ ->
|
}, MangaInfoController::onFetchMangaError)
|
||||||
view.onFetchMangaError()
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user