mirror of
https://github.com/mihonapp/mihon.git
synced 2024-12-25 02:18:24 +01:00
Minor changes
This commit is contained in:
parent
8a3bb2b7ee
commit
65a2345bf7
@ -279,13 +279,7 @@ public class ChaptersFragment extends BaseRxFragment<ChaptersPresenter> implemen
|
|||||||
DownloadService.start(getActivity());
|
DownloadService.start(getActivity());
|
||||||
|
|
||||||
Observable<Chapter> observable = chapters
|
Observable<Chapter> observable = chapters
|
||||||
.doOnNext(chapter -> {
|
.doOnCompleted(adapter::notifyDataSetChanged);
|
||||||
// Force update of the UI. We already receive updates when it's added to the queue,
|
|
||||||
// but sometimes it does nothing.
|
|
||||||
// TODO remove this when status updates works properly
|
|
||||||
chapter.status = Download.QUEUE;
|
|
||||||
onChapterStatusChange(chapter);
|
|
||||||
});
|
|
||||||
|
|
||||||
getPresenter().downloadChapters(observable);
|
getPresenter().downloadChapters(observable);
|
||||||
closeActionMode();
|
closeActionMode();
|
||||||
@ -311,8 +305,8 @@ public class ChaptersFragment extends BaseRxFragment<ChaptersPresenter> implemen
|
|||||||
.doOnNext(chapter -> {
|
.doOnNext(chapter -> {
|
||||||
dialog.incrementProgress(1);
|
dialog.incrementProgress(1);
|
||||||
chapter.status = Download.NOT_DOWNLOADED;
|
chapter.status = Download.NOT_DOWNLOADED;
|
||||||
onChapterStatusChange(chapter);
|
|
||||||
})
|
})
|
||||||
|
.doOnCompleted(adapter::notifyDataSetChanged)
|
||||||
.finallyDo(dialog::dismiss);
|
.finallyDo(dialog::dismiss);
|
||||||
|
|
||||||
getPresenter().deleteChapters(observable);
|
getPresenter().deleteChapters(observable);
|
||||||
|
Loading…
Reference in New Issue
Block a user