Use onBackpressureLatest for chapter/page download observables (maybe fixes #3229)
(cherry picked from commit 759795940b78d3791c2d2f765f5762d27c79a8ef)
This commit is contained in:
parent
c66cb1bb27
commit
f9ef44d586
@ -191,7 +191,7 @@ class Downloader(
|
||||
},
|
||||
5
|
||||
)
|
||||
.onBackpressureBuffer()
|
||||
.onBackpressureLatest()
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(
|
||||
{
|
||||
@ -300,6 +300,7 @@ class Downloader(
|
||||
// Start downloading images, consider we can have downloaded images already
|
||||
// Concurrently do 5 pages at a time
|
||||
.flatMap({ page -> getOrDownloadImage(page, download, tmpDir) }, 5)
|
||||
.onBackpressureLatest()
|
||||
// Do when page is downloaded.
|
||||
.doOnNext { notifier.onProgressChange(download) }
|
||||
.toList()
|
||||
|
Loading…
x
Reference in New Issue
Block a user