mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 16:18:55 +01:00 
			
		
		
		
	fix DOWNLOADED text showing after chapters are marked as read (#2434)	df14e6d4	Carlos <cargo8005@gmail.com>	Jan 5, 2020 at 16:36
				
					
				
			This commit is contained in:
		@@ -404,8 +404,12 @@ class ChaptersController : NucleusController<ChaptersPresenter>(),
 | 
			
		||||
        presenter.deleteChapters(chapters)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    fun onChaptersDeleted() {
 | 
			
		||||
    fun onChaptersDeleted(chapters: List<ChapterItem>) {
 | 
			
		||||
        dismissDeletingDialog()
 | 
			
		||||
        //this is needed so the downloaded text gets removed from the item
 | 
			
		||||
        chapters.forEach {
 | 
			
		||||
            adapter?.updateItem(it)
 | 
			
		||||
        }
 | 
			
		||||
        adapter?.notifyDataSetChanged()
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -278,7 +278,7 @@ class ChaptersPresenter(
 | 
			
		||||
                .subscribeOn(Schedulers.io())
 | 
			
		||||
                .observeOn(AndroidSchedulers.mainThread())
 | 
			
		||||
                .subscribeFirst({ view, _ ->
 | 
			
		||||
                    view.onChaptersDeleted()
 | 
			
		||||
                    view.onChaptersDeleted(chapters)
 | 
			
		||||
                }, ChaptersController::onChaptersDeletedError)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user