mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	Show error when trying to download chapters from not installed source (closes #4283)
This commit is contained in:
		@@ -49,7 +49,7 @@ open class SourceManager(private val context: Context) {
 | 
			
		||||
        LocalSource(context)
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    private inner class StubSource(override val id: Long) : Source {
 | 
			
		||||
    inner class StubSource(override val id: Long) : Source {
 | 
			
		||||
 | 
			
		||||
        override val name: String
 | 
			
		||||
            get() = id.toString()
 | 
			
		||||
 
 | 
			
		||||
@@ -917,6 +917,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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user