From 15f225537ec1ea67939002b12f6ad61920f2709e Mon Sep 17 00:00:00 2001 From: Jannis Becker <31903525+moka491@users.noreply.github.com> Date: Sat, 25 May 2019 13:46:20 +0200 Subject: [PATCH] Update tracking sites after finishing chapter (#2044) * Added second updateTrackLastChapterRead() called whenever a chapter has been read in the reader * Removed old updateTrackLastChapterRead() so that it's not called twice. --- .../java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt index e24feb8e3..b2aafa0a2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt @@ -147,10 +147,9 @@ class ReaderPresenter( /** * Called when the user pressed the back button and is going to leave the reader. Used to - * update tracking services and trigger deletion of the downloaded chapters. + * trigger deletion of the downloaded chapters. */ fun onBackPressed() { - updateTrackLastChapterRead() deletePendingChapters() } @@ -308,7 +307,7 @@ class ReaderPresenter( /** * Called every time a page changes on the reader. Used to mark the flag of chapters being - * read, enqueue downloaded chapter deletion, and updating the active chapter if this + * read, update tracking services, enqueue downloaded chapter deletion, and updating the active chapter if this * [page]'s chapter is different from the currently active. */ fun onPageSelected(page: ReaderPage) { @@ -320,6 +319,7 @@ class ReaderPresenter( selectedChapter.chapter.last_page_read = page.index if (selectedChapter.pages?.lastIndex == page.index) { selectedChapter.chapter.read = true + updateTrackLastChapterRead() enqueueDeleteReadChapters(selectedChapter) }