From db58c9b77ff109098b3fe435d48cf68248b7e8d2 Mon Sep 17 00:00:00 2001 From: Carlos Date: Sun, 5 Jan 2020 16:36:23 -0500 Subject: [PATCH] fix DOWNLOADED text showing after chapters are marked as read (#2434) df14e6d4 Carlos Jan 5, 2020 at 16:36 --- .../kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt | 6 +++++- .../kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.kt | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt index edb032634..13b136456 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt @@ -404,8 +404,12 @@ class ChaptersController : NucleusController(), presenter.deleteChapters(chapters) } - fun onChaptersDeleted() { + fun onChaptersDeleted(chapters: List) { dismissDeletingDialog() + //this is needed so the downloaded text gets removed from the item + chapters.forEach { + adapter?.updateItem(it) + } adapter?.notifyDataSetChanged() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.kt index b04369c34..271a58605 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.kt @@ -278,7 +278,7 @@ class ChaptersPresenter( .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribeFirst({ view, _ -> - view.onChaptersDeleted() + view.onChaptersDeleted(chapters) }, ChaptersController::onChaptersDeletedError) }