mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-03 07:38:55 +01:00
Introduce coroutines. Fix #1027. Lower notification channels' importance
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user