Skip to content

Commit

Permalink
Apply Review
Browse files Browse the repository at this point in the history
  • Loading branch information
Animeboynz committed Oct 25, 2024
1 parent 3fe7642 commit 31fb2c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -736,9 +736,9 @@ class MangaScreenModel(
chapters = chapters.toTypedArray(),
)

if (!read ||
if (
successState?.hasLoggedInTrackers == false ||
autoTrackState == AutoTrackState.NEVER
!read || autoTrackState == AutoTrackState.NEVER
) {
return@launchIO
}
Expand Down

0 comments on commit 31fb2c7

Please sign in to comment.