mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-10 20:57:24 +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:
parent
c4dad1c20b
commit
db58c9b77f
@ -404,8 +404,12 @@ class ChaptersController : NucleusController<ChaptersPresenter>(),
|
|||||||
presenter.deleteChapters(chapters)
|
presenter.deleteChapters(chapters)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onChaptersDeleted() {
|
fun onChaptersDeleted(chapters: List<ChapterItem>) {
|
||||||
dismissDeletingDialog()
|
dismissDeletingDialog()
|
||||||
|
//this is needed so the downloaded text gets removed from the item
|
||||||
|
chapters.forEach {
|
||||||
|
adapter?.updateItem(it)
|
||||||
|
}
|
||||||
adapter?.notifyDataSetChanged()
|
adapter?.notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ class ChaptersPresenter(
|
|||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribeFirst({ view, _ ->
|
.subscribeFirst({ view, _ ->
|
||||||
view.onChaptersDeleted()
|
view.onChaptersDeleted(chapters)
|
||||||
}, ChaptersController::onChaptersDeletedError)
|
}, ChaptersController::onChaptersDeletedError)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user