Skip to content

Commit

Permalink
Merge branch 'upstream'
Browse files Browse the repository at this point in the history
  • Loading branch information
jmir1 committed Jun 8, 2021
2 parents 4da94a0 + e26b8d8 commit 096ea08
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ class MangaPresenter(
observeDownloadsStatusSubscription?.let { remove(it) }
observeDownloadsStatusSubscription = downloadManager.queue.getStatusObservable()
.observeOn(Schedulers.io())
.onBackpressureLatest()
.onBackpressureBuffer()
.filter { download -> download.manga.id == manga.id }
.observeOn(AndroidSchedulers.mainThread())
.subscribeLatestCache(
Expand All @@ -375,7 +375,7 @@ class MangaPresenter(
observeDownloadsPageSubscription?.let { remove(it) }
observeDownloadsPageSubscription = downloadManager.queue.getProgressObservable()
.observeOn(Schedulers.io())
.onBackpressureLatest()
.onBackpressureBuffer()
.filter { download -> download.manga.id == manga.id }
.observeOn(AndroidSchedulers.mainThread())
.subscribeLatestCache(MangaController::onChapterDownloadUpdate) { _, error ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ class ChapterDownloadView @JvmOverloads constructor(context: Context, attrs: Att
state == Download.State.NOT_DOWNLOADED || state == Download.State.QUEUE
if (shouldBeVisible) {
hideAnimationBehavior = BaseProgressIndicator.HIDE_NONE
show()

if (state == Download.State.NOT_DOWNLOADED || state == Download.State.QUEUE) {
trackThickness = 2.dpToPx
setIndicatorColor(context.getThemeColor(android.R.attr.textColorHint))
Expand All @@ -72,6 +70,7 @@ class ChapterDownloadView @JvmOverloads constructor(context: Context, attrs: Att
setIndicatorColor(context.getThemeColor(android.R.attr.textColorPrimary))
setProgressCompat(progress, true)
}
show()
} else {
hideAnimationBehavior = BaseProgressIndicator.HIDE_OUTWARD
hide()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class UpdatesPresenter(

downloadManager.queue.getStatusObservable()
.observeOn(Schedulers.io())
.onBackpressureLatest()
.onBackpressureBuffer()
.observeOn(AndroidSchedulers.mainThread())
.subscribeLatestCache(
{ view, it ->
Expand All @@ -55,7 +55,7 @@ class UpdatesPresenter(

downloadManager.queue.getProgressObservable()
.observeOn(Schedulers.io())
.onBackpressureLatest()
.onBackpressureBuffer()
.observeOn(AndroidSchedulers.mainThread())
.subscribeLatestCache(UpdatesController::onChapterDownloadUpdate) { _, error ->
Timber.e(error)
Expand Down

0 comments on commit 096ea08

Please sign in to comment.