mirror of
https://github.com/mihonapp/mihon.git
synced 2024-12-24 18:08:24 +01:00
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.
This commit is contained in:
parent
a32572fc96
commit
15f225537e
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user