mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 05:51:49 +01:00
Minor download icon optimizations
This commit is contained in:
parent
aded11e599
commit
7a373fb43a
@ -316,19 +316,26 @@ class MangaPresenter(
|
|||||||
private fun observeDownloads() {
|
private fun observeDownloads() {
|
||||||
observeDownloadsStatusSubscription?.let { remove(it) }
|
observeDownloadsStatusSubscription?.let { remove(it) }
|
||||||
observeDownloadsStatusSubscription = downloadManager.queue.getStatusObservable()
|
observeDownloadsStatusSubscription = downloadManager.queue.getStatusObservable()
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(Schedulers.io())
|
||||||
.onBackpressureLatest()
|
.onBackpressureLatest()
|
||||||
.filter { download -> download.manga.id == manga.id }
|
.filter { download -> download.manga.id == manga.id }
|
||||||
.doOnNext { onDownloadStatusChange(it) }
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribeLatestCache(MangaController::onChapterDownloadUpdate) { _, error ->
|
.subscribeLatestCache(
|
||||||
|
{ view, it ->
|
||||||
|
onDownloadStatusChange(it)
|
||||||
|
view.onChapterDownloadUpdate(it)
|
||||||
|
},
|
||||||
|
{ _, error ->
|
||||||
Timber.e(error)
|
Timber.e(error)
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
|
||||||
observeDownloadsPageSubscription?.let { remove(it) }
|
observeDownloadsPageSubscription?.let { remove(it) }
|
||||||
observeDownloadsPageSubscription = downloadManager.queue.getProgressObservable()
|
observeDownloadsPageSubscription = downloadManager.queue.getProgressObservable()
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(Schedulers.io())
|
||||||
.onBackpressureLatest()
|
.onBackpressureLatest()
|
||||||
.filter { download -> download.manga.id == manga.id }
|
.filter { download -> download.manga.id == manga.id }
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribeLatestCache(MangaController::onChapterDownloadUpdate) { _, error ->
|
.subscribeLatestCache(MangaController::onChapterDownloadUpdate) { _, error ->
|
||||||
Timber.e(error)
|
Timber.e(error)
|
||||||
}
|
}
|
||||||
|
@ -40,13 +40,22 @@ class UpdatesPresenter(
|
|||||||
.subscribeLatestCache(UpdatesController::onNextRecentChapters)
|
.subscribeLatestCache(UpdatesController::onNextRecentChapters)
|
||||||
|
|
||||||
downloadManager.queue.getStatusObservable()
|
downloadManager.queue.getStatusObservable()
|
||||||
|
.observeOn(Schedulers.io())
|
||||||
|
.onBackpressureLatest()
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.doOnNext { onDownloadStatusChange(it) }
|
.subscribeLatestCache(
|
||||||
.subscribeLatestCache(UpdatesController::onChapterDownloadUpdate) { _, error ->
|
{ view, it ->
|
||||||
|
onDownloadStatusChange(it)
|
||||||
|
view.onChapterDownloadUpdate(it)
|
||||||
|
},
|
||||||
|
{ _, error ->
|
||||||
Timber.e(error)
|
Timber.e(error)
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
|
||||||
downloadManager.queue.getProgressObservable()
|
downloadManager.queue.getProgressObservable()
|
||||||
|
.observeOn(Schedulers.io())
|
||||||
|
.onBackpressureLatest()
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribeLatestCache(UpdatesController::onChapterDownloadUpdate) { _, error ->
|
.subscribeLatestCache(UpdatesController::onChapterDownloadUpdate) { _, error ->
|
||||||
Timber.e(error)
|
Timber.e(error)
|
||||||
|
Loading…
Reference in New Issue
Block a user