Browse Source

Fix an UI refresh issue

inorichi 9 năm trước cách đây
mục cha
commit
e81f98a975

+ 3 - 3
app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersFragment.java

@@ -163,10 +163,10 @@ public class ChaptersFragment extends BaseRxFragment<ChaptersPresenter> 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

+ 1 - 1
app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.java

@@ -71,7 +71,7 @@ public class ChaptersPresenter extends BasePresenter<ChaptersFragment> {
 
         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();