Try to avoid crashing when source fails to return pages
(cherry picked from commit 2f7f00c7a24d1081775a30430086f6c007a7e3b7)
This commit is contained in:
parent
b3ddc1dfa3
commit
1389649553
@ -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 ->
|
||||
|
Loading…
x
Reference in New Issue
Block a user