Reset lastPageRead when chapter is marked unread (#7475)

* Reset lastPageRead when chapter is marked unread

* Remove a bit of repetition in SetReadStatus
This commit is contained in:
Andreas
2022-07-08 04:34:58 +02:00
committed by GitHub
parent 9357af2bcf
commit 5159eabc5d
7 changed files with 132 additions and 41 deletions

View File

@@ -14,11 +14,13 @@ import eu.kanade.domain.category.interactor.UpdateCategory
import eu.kanade.domain.category.repository.CategoryRepository
import eu.kanade.domain.chapter.interactor.GetChapter
import eu.kanade.domain.chapter.interactor.GetChapterByMangaId
import eu.kanade.domain.chapter.interactor.SetReadStatus
import eu.kanade.domain.chapter.interactor.ShouldUpdateDbChapter
import eu.kanade.domain.chapter.interactor.SyncChaptersWithSource
import eu.kanade.domain.chapter.interactor.SyncChaptersWithTrackServiceTwoWay
import eu.kanade.domain.chapter.interactor.UpdateChapter
import eu.kanade.domain.chapter.repository.ChapterRepository
import eu.kanade.domain.download.interactor.DeleteDownload
import eu.kanade.domain.extension.interactor.GetExtensionLanguages
import eu.kanade.domain.extension.interactor.GetExtensionSources
import eu.kanade.domain.extension.interactor.GetExtensionUpdates
@@ -94,6 +96,7 @@ class DomainModule : InjektModule {
addFactory { GetChapter(get()) }
addFactory { GetChapterByMangaId(get()) }
addFactory { UpdateChapter(get()) }
addFactory { SetReadStatus(get(), get(), get(), get()) }
addFactory { ShouldUpdateDbChapter() }
addFactory { SyncChaptersWithSource(get(), get(), get(), get()) }
addFactory { SyncChaptersWithTrackServiceTwoWay(get(), get()) }
@@ -105,6 +108,8 @@ class DomainModule : InjektModule {
addFactory { RemoveHistoryById(get()) }
addFactory { RemoveHistoryByMangaId(get()) }
addFactory { DeleteDownload(get(), get()) }
addFactory { GetExtensions(get(), get()) }
addFactory { GetExtensionSources(get()) }
addFactory { GetExtensionUpdates(get(), get()) }