Fix download status updates not appearing in chapters list (fixes #3358)

This commit is contained in:
arkon
2020-07-30 22:22:37 -04:00
parent 3813743e3d
commit 99710b45d1
3 changed files with 6 additions and 10 deletions

View File

@@ -176,14 +176,14 @@ class DownloadService : Service() {
/**
* Releases the wake lock if it's held.
*/
fun PowerManager.WakeLock.releaseIfNeeded() {
private fun PowerManager.WakeLock.releaseIfNeeded() {
if (isHeld) release()
}
/**
* Acquires the wake lock if it's not held.
*/
fun PowerManager.WakeLock.acquireIfNeeded() {
private fun PowerManager.WakeLock.acquireIfNeeded() {
if (!isHeld) acquire()
}

View File

@@ -231,8 +231,6 @@ class Downloader(
val wasEmpty = queue.isEmpty()
// Called in background thread, the operation can be slow with SAF.
val chaptersWithoutDir = async {
val mangaDir = provider.findMangaDir(manga, source)
chapters
// Filter out those already downloaded.
.filter { provider.findChapterDir(it, manga, source) == null }