mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-10 08:07:48 +01:00
Only preload pages without the image url
This commit is contained in:
parent
34201bece1
commit
c803b91223
1 changed files with 3 additions and 1 deletions
|
@ -183,7 +183,9 @@ public class ReaderPresenter extends BasePresenter<ReaderActivity> {
|
|||
int pagesToPreload = Math.min(pages.size(), 5);
|
||||
return Observable.from(pages)
|
||||
.take(pagesToPreload)
|
||||
.concatMap(source::getImageUrlFromPage)
|
||||
.concatMap(page -> page.getImageUrl() == null ?
|
||||
source.getImageUrlFromPage(page) :
|
||||
Observable.just(page))
|
||||
.doOnCompleted(this::stopPreloadingNextChapter);
|
||||
})
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
|
Loading…
Reference in a new issue