Implement a download cache
This commit is contained in:
@@ -79,7 +79,7 @@ class ChapterLoader(
|
||||
private fun retrievePageList(chapter: ReaderChapter) = Observable.just(chapter)
|
||||
.flatMap {
|
||||
// Check if the chapter is downloaded.
|
||||
chapter.isDownloaded = downloadManager.findChapterDir(source, manga, chapter) != null
|
||||
chapter.isDownloaded = downloadManager.isChapterDownloaded(chapter, manga, true)
|
||||
|
||||
if (chapter.isDownloaded) {
|
||||
// Fetch the page list from disk.
|
||||
|
||||
@@ -411,7 +411,7 @@ class ReaderPresenter(
|
||||
fun deleteChapter(chapter: ReaderChapter, manga: Manga) {
|
||||
chapter.isDownloaded = false
|
||||
chapter.pages?.forEach { it.status == Page.QUEUE }
|
||||
downloadManager.deleteChapter(source, manga, chapter)
|
||||
downloadManager.deleteChapter(chapter, manga, source)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user