mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 11:17:25 +01:00
Fix an UI refresh issue
This commit is contained in:
parent
11dc0d7e9e
commit
e81f98a975
@ -163,10 +163,10 @@ public class ChaptersFragment extends BaseRxFragment<ChaptersPresenter> implemen
|
|||||||
holder.onProgressChange(getContext(), download.downloadedImages, download.pages.size());
|
holder.onProgressChange(getContext(), download.downloadedImages, download.pages.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onChapterStatusChange(Chapter chapter) {
|
public void onChapterStatusChange(Download download) {
|
||||||
ChaptersHolder holder = getHolder(chapter);
|
ChaptersHolder holder = getHolder(download.chapter);
|
||||||
if (holder != null)
|
if (holder != null)
|
||||||
holder.onStatusChange(chapter.status);
|
holder.onStatusChange(download.getStatus());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@ -71,7 +71,7 @@ public class ChaptersPresenter extends BasePresenter<ChaptersFragment> {
|
|||||||
|
|
||||||
restartableLatestCache(CHAPTER_STATUS_CHANGES,
|
restartableLatestCache(CHAPTER_STATUS_CHANGES,
|
||||||
this::getChapterStatusObs,
|
this::getChapterStatusObs,
|
||||||
(view, download) -> view.onChapterStatusChange(download.chapter),
|
(view, download) -> view.onChapterStatusChange(download),
|
||||||
(view, error) -> Timber.e(error.getCause(), error.getMessage()));
|
(view, error) -> Timber.e(error.getCause(), error.getMessage()));
|
||||||
|
|
||||||
registerForStickyEvents();
|
registerForStickyEvents();
|
||||||
|
Loading…
Reference in New Issue
Block a user