Introduce coroutines. Fix #1027. Lower notification channels' importance

This commit is contained in:
len
2017-10-13 00:12:29 +02:00
parent d97aff85b3
commit 4abd2d709f
6 changed files with 70 additions and 56 deletions

View File

@@ -7,7 +7,6 @@ import eu.kanade.tachiyomi.data.database.DatabaseHelper
import eu.kanade.tachiyomi.data.database.models.Chapter
import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.data.download.DownloadManager
import eu.kanade.tachiyomi.data.download.DownloadService
import eu.kanade.tachiyomi.data.download.model.Download
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
import eu.kanade.tachiyomi.source.Source
@@ -35,8 +34,6 @@ class ChaptersPresenter(
private val downloadManager: DownloadManager = Injekt.get()
) : BasePresenter<ChaptersController>() {
private val context = preferences.context
/**
* List of chapters of the manga. It's always unfiltered and unsorted.
*/
@@ -246,7 +243,6 @@ class ChaptersPresenter(
* @param chapters the list of chapters to download.
*/
fun downloadChapters(chapters: List<ChapterItem>) {
DownloadService.start(context)
downloadManager.downloadChapters(manga, chapters)
}

View File

@@ -25,8 +25,6 @@ class RecentChaptersPresenter(
private val sourceManager: SourceManager = Injekt.get()
) : BasePresenter<RecentChaptersController>() {
private val context = preferences.context
/**
* List containing chapter and manga information
*/
@@ -207,7 +205,6 @@ class RecentChaptersPresenter(
*/
fun downloadChapters(items: List<RecentChapterItem>) {
items.forEach { downloadManager.downloadChapters(it.manga, listOf(it.chapter)) }
DownloadService.start(context)
}
/**