diff --git a/app/src/main/java/eu/kanade/domain/track/model/AutoTrackState.kt b/app/src/main/java/eu/kanade/domain/track/model/AutoTrackState.kt index a45851251..987999b74 100644 --- a/app/src/main/java/eu/kanade/domain/track/model/AutoTrackState.kt +++ b/app/src/main/java/eu/kanade/domain/track/model/AutoTrackState.kt @@ -4,7 +4,7 @@ import dev.icerock.moko.resources.StringResource import tachiyomi.i18n.MR enum class AutoTrackState(val titleRes: StringResource) { - ASK(MR.strings.default_category_summary), ALWAYS(MR.strings.lock_always), + ASK(MR.strings.default_category_summary), NEVER(MR.strings.lock_never), } diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsTrackingScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsTrackingScreen.kt index a3bcc5f3a..2a7231112 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsTrackingScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsTrackingScreen.kt @@ -53,8 +53,8 @@ import eu.kanade.tachiyomi.data.track.shikimori.ShikimoriApi import eu.kanade.tachiyomi.util.system.openInBrowser import eu.kanade.tachiyomi.util.system.toast import kotlinx.collections.immutable.persistentListOf -import kotlinx.collections.immutable.persistentMapOf import kotlinx.collections.immutable.toImmutableList +import kotlinx.collections.immutable.toPersistentMap import tachiyomi.core.common.util.lang.launchIO import tachiyomi.core.common.util.lang.withUIContext import tachiyomi.domain.source.service.SourceManager @@ -131,15 +131,9 @@ object SettingsTrackingScreen : SearchableSettings { Preference.PreferenceItem.ListPreference( pref = trackPreferences.autoUpdateTrackOnMarkRead(), title = stringResource(MR.strings.pref_auto_update_manga_on_mark_read), - entries = persistentMapOf( - AutoTrackState.ALWAYS to stringResource(MR.strings.lock_always), - AutoTrackState.NEVER to stringResource(MR.strings.lock_never), - AutoTrackState.ASK to stringResource(MR.strings.default_category_summary), - ), - onValueChanged = { - autoTrackStatePref.set(it) - true - }, + entries = AutoTrackState.entries + .associateWith { stringResource(it.titleRes) } + .toPersistentMap(), ), Preference.PreferenceGroup( title = stringResource(MR.strings.services), diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt index f58f7cfd2..75f730f0d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt @@ -736,9 +736,9 @@ class MangaScreenModel( chapters = chapters.toTypedArray(), ) - if (!read || + if ( successState?.hasLoggedInTrackers == false || - autoTrackState == AutoTrackState.NEVER + !read || autoTrackState == AutoTrackState.NEVER ) { return@launchIO }