Try to avoid crashing when source fails to return pages
(cherry picked from commit 2f7f00c7a2)
This commit is contained in:
@@ -98,6 +98,7 @@ class HttpPageLoader(
|
||||
override fun getPages(): Observable<List<ReaderPage>> {
|
||||
return Observable.fromCallable { chapterCache.getPageListFromCache(chapter.chapter) }
|
||||
.onErrorResumeNext { source.fetchPageList(chapter.chapter) }
|
||||
.onErrorReturn { emptyList() }
|
||||
.map { pages ->
|
||||
// SY -->
|
||||
val rp = pages.mapIndexed { index, page ->
|
||||
|
||||
Reference in New Issue
Block a user