Apply Review

This commit is contained in:
Roshan Varughese 2024-10-26 11:50:11 +13:00
parent 3fe7642aea
commit 31fb2c7910
3 changed files with 7 additions and 13 deletions

View File

@ -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),
}

View File

@ -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),

View File

@ -736,9 +736,9 @@ class MangaScreenModel(
chapters = chapters.toTypedArray(),
)
if (!read ||
if (
successState?.hasLoggedInTrackers == false ||
autoTrackState == AutoTrackState.NEVER
!read || autoTrackState == AutoTrackState.NEVER
) {
return@launchIO
}