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:
Carlos 2020-01-05 16:36:23 -05:00 committed by arkon
parent c4dad1c20b
commit db58c9b77f
2 changed files with 6 additions and 2 deletions

View File

@ -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()
}

View File

@ -278,7 +278,7 @@ class ChaptersPresenter(
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribeFirst({ view, _ ->
view.onChaptersDeleted()
view.onChaptersDeleted(chapters)
}, ChaptersController::onChaptersDeletedError)
}