mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-19 23:41:13 +01:00
Show download status in chapters fragment
This commit is contained in:
@@ -119,7 +119,7 @@ public class DownloadManager {
|
||||
}
|
||||
}
|
||||
|
||||
// Public method to checks if a chapter is downloaded
|
||||
// Public method to check if a chapter is downloaded
|
||||
public boolean isChapterDownloaded(Source source, Manga manga, Chapter chapter) {
|
||||
File directory = getAbsoluteChapterDirectory(source, manga, chapter);
|
||||
if (!directory.exists())
|
||||
|
||||
@@ -3,10 +3,12 @@ package eu.kanade.mangafeed.data.download.model;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import de.greenrobot.event.EventBus;
|
||||
import eu.kanade.mangafeed.data.database.models.Chapter;
|
||||
import eu.kanade.mangafeed.data.database.models.Manga;
|
||||
import eu.kanade.mangafeed.data.source.model.Page;
|
||||
import eu.kanade.mangafeed.data.source.base.Source;
|
||||
import eu.kanade.mangafeed.data.source.model.Page;
|
||||
import eu.kanade.mangafeed.event.DownloadStatusEvent;
|
||||
import rx.subjects.PublishSubject;
|
||||
|
||||
public class Download {
|
||||
@@ -52,5 +54,6 @@ public class Download {
|
||||
private void notifyStatus() {
|
||||
if (statusSubject != null)
|
||||
statusSubject.onNext(this);
|
||||
EventBus.getDefault().post(new DownloadStatusEvent(chapter.id, status));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user