From e81f98a97560582467a39a635a39ddb45f19c9a3 Mon Sep 17 00:00:00 2001 From: inorichi Date: Sat, 23 Jan 2016 14:17:01 +0100 Subject: [PATCH] Fix an UI refresh issue --- .../kanade/tachiyomi/ui/manga/chapter/ChaptersFragment.java | 6 +++--- .../tachiyomi/ui/manga/chapter/ChaptersPresenter.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersFragment.java b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersFragment.java index 05c115919d..ce0a685577 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersFragment.java +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersFragment.java @@ -163,10 +163,10 @@ public class ChaptersFragment extends BaseRxFragment implemen holder.onProgressChange(getContext(), download.downloadedImages, download.pages.size()); } - public void onChapterStatusChange(Chapter chapter) { - ChaptersHolder holder = getHolder(chapter); + public void onChapterStatusChange(Download download) { + ChaptersHolder holder = getHolder(download.chapter); if (holder != null) - holder.onStatusChange(chapter.status); + holder.onStatusChange(download.getStatus()); } @Nullable diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.java b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.java index 034543b598..58814af072 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.java +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.java @@ -71,7 +71,7 @@ public class ChaptersPresenter extends BasePresenter { restartableLatestCache(CHAPTER_STATUS_CHANGES, this::getChapterStatusObs, - (view, download) -> view.onChapterStatusChange(download.chapter), + (view, download) -> view.onChapterStatusChange(download), (view, error) -> Timber.e(error.getCause(), error.getMessage())); registerForStickyEvents();