This commit is contained in:
Roshan Varughese 2024-10-25 21:24:50 +13:00
parent 1a00e76e63
commit 3fe7642aea
2 changed files with 10 additions and 2 deletions

View File

@ -38,5 +38,8 @@ class TrackPreferences(
fun autoUpdateTrack() = preferenceStore.getBoolean("pref_auto_update_manga_sync_key", true) fun autoUpdateTrack() = preferenceStore.getBoolean("pref_auto_update_manga_sync_key", true)
fun autoUpdateTrackOnMarkRead() = preferenceStore.getEnum("pref_auto_update_manga_on_mark_read", AutoTrackState.ALWAYS) fun autoUpdateTrackOnMarkRead() = preferenceStore.getEnum(
"pref_auto_update_manga_on_mark_read",
AutoTrackState.ALWAYS,
)
} }

View File

@ -736,7 +736,12 @@ class MangaScreenModel(
chapters = chapters.toTypedArray(), chapters = chapters.toTypedArray(),
) )
if (!read || successState?.hasLoggedInTrackers == false || autoTrackState == AutoTrackState.NEVER) return@launchIO if (!read ||
successState?.hasLoggedInTrackers == false ||
autoTrackState == AutoTrackState.NEVER
) {
return@launchIO
}
val tracks = getTracks.await(mangaId) val tracks = getTracks.await(mangaId)
val maxChapterNumber = chapters.maxOf { it.chapterNumber } val maxChapterNumber = chapters.maxOf { it.chapterNumber }