Show error when trying to download chapters from not installed source (closes #4283)

(cherry picked from commit 9670863a418c39d2371e20b20557e7075961cb5e)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/source/SourceManager.kt
This commit is contained in:
arkon 2021-01-10 11:11:53 -05:00 committed by Jobobby04
parent d4b0e2869d
commit 7b4311c7dc
2 changed files with 6 additions and 1 deletions

View File

@ -155,7 +155,7 @@ open class SourceManager(private val context: Context) {
}
// SY <--
private inner class StubSource(override val id: Long) : Source {
inner class StubSource(override val id: Long) : Source {
override val name: String
get() = id.toString()

View File

@ -1328,6 +1328,11 @@ class MangaController :
}
private fun downloadChapters(chapters: List<ChapterItem>) {
if (source is SourceManager.StubSource) {
activity?.toast(R.string.loader_not_implemented_error)
return
}
val view = view
val manga = presenter.manga
presenter.downloadChapters(chapters)