From 2081457ade4d4356a477a1d00f9df0bc9893b601 Mon Sep 17 00:00:00 2001 From: Jay Date: Sat, 11 Jan 2020 01:29:37 -0800 Subject: [PATCH] Cleanup with recently read bug --- .../recently_read/RecentlyReadController.kt | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadController.kt index 4205979990..8a39aad3e0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadController.kt @@ -145,32 +145,13 @@ class RecentlyReadController : NucleusController(), } override fun removeHistory(manga: Manga, history: History, all: Boolean) { + presenter.lastCount = adapter?.itemCount ?: 25 if (all) { // Reset last read of chapter to 0L presenter.removeAllFromHistory(manga.id!!) - /*val safeAdapter = adapter ?: return - val items = (0 until safeAdapter.itemCount).filter { - val item = safeAdapter.getItem(it) - if (item is RecentlyReadItem) - item.mch.manga.id == manga.id - - else - false - } - adapter?.removeItems(items)*/ } else { // Remove all chapters belonging to manga from library presenter.removeFromHistory(history) - /*val safeAdapter = adapter ?: return - val item = (0 until safeAdapter.itemCount).find { - val item = safeAdapter.getItem(it) - if (item is RecentlyReadItem) - item.mch.history == history - - else - false - } ?: return - adapter?.removeItem(item)*/ } }