Make DownloadManager the sole entry point for DownloadService (#9140)
* Rename functions for DownloadService internal use * Call DownloadService.start via DownloadManager * Inline DownloadService.stop into pauseDownloads * Inline DownloadService.stop into clearQueue NotificationReceiver will now also stop the DownloadService when receiving ACTION_CLEAR_DOWNLOADS. * Provide DownloadService.isRunning via DownloadManager
This commit is contained in:
@@ -18,7 +18,6 @@ import eu.kanade.presentation.manga.components.ChapterDownloadAction
|
||||
import eu.kanade.presentation.updates.UpdatesUiModel
|
||||
import eu.kanade.tachiyomi.data.download.DownloadCache
|
||||
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.library.LibraryUpdateJob
|
||||
import eu.kanade.tachiyomi.source.SourceManager
|
||||
@@ -168,7 +167,7 @@ class UpdatesScreenModel(
|
||||
ChapterDownloadAction.START -> {
|
||||
downloadChapters(items)
|
||||
if (items.any { it.downloadStateProvider() == Download.State.ERROR }) {
|
||||
DownloadService.start(Injekt.get<Application>())
|
||||
downloadManager.startDownloads()
|
||||
}
|
||||
}
|
||||
ChapterDownloadAction.START_NOW -> {
|
||||
|
||||
Reference in New Issue
Block a user