mirror of
https://github.com/mihonapp/mihon.git
synced 2025-01-15 12:43:11 +01:00
Apply Review
This commit is contained in:
parent
3fe7642aea
commit
31fb2c7910
@ -4,7 +4,7 @@ import dev.icerock.moko.resources.StringResource
|
|||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
|
|
||||||
enum class AutoTrackState(val titleRes: StringResource) {
|
enum class AutoTrackState(val titleRes: StringResource) {
|
||||||
ASK(MR.strings.default_category_summary),
|
|
||||||
ALWAYS(MR.strings.lock_always),
|
ALWAYS(MR.strings.lock_always),
|
||||||
|
ASK(MR.strings.default_category_summary),
|
||||||
NEVER(MR.strings.lock_never),
|
NEVER(MR.strings.lock_never),
|
||||||
}
|
}
|
||||||
|
@ -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.openInBrowser
|
||||||
import eu.kanade.tachiyomi.util.system.toast
|
import eu.kanade.tachiyomi.util.system.toast
|
||||||
import kotlinx.collections.immutable.persistentListOf
|
import kotlinx.collections.immutable.persistentListOf
|
||||||
import kotlinx.collections.immutable.persistentMapOf
|
|
||||||
import kotlinx.collections.immutable.toImmutableList
|
import kotlinx.collections.immutable.toImmutableList
|
||||||
|
import kotlinx.collections.immutable.toPersistentMap
|
||||||
import tachiyomi.core.common.util.lang.launchIO
|
import tachiyomi.core.common.util.lang.launchIO
|
||||||
import tachiyomi.core.common.util.lang.withUIContext
|
import tachiyomi.core.common.util.lang.withUIContext
|
||||||
import tachiyomi.domain.source.service.SourceManager
|
import tachiyomi.domain.source.service.SourceManager
|
||||||
@ -131,15 +131,9 @@ object SettingsTrackingScreen : SearchableSettings {
|
|||||||
Preference.PreferenceItem.ListPreference(
|
Preference.PreferenceItem.ListPreference(
|
||||||
pref = trackPreferences.autoUpdateTrackOnMarkRead(),
|
pref = trackPreferences.autoUpdateTrackOnMarkRead(),
|
||||||
title = stringResource(MR.strings.pref_auto_update_manga_on_mark_read),
|
title = stringResource(MR.strings.pref_auto_update_manga_on_mark_read),
|
||||||
entries = persistentMapOf(
|
entries = AutoTrackState.entries
|
||||||
AutoTrackState.ALWAYS to stringResource(MR.strings.lock_always),
|
.associateWith { stringResource(it.titleRes) }
|
||||||
AutoTrackState.NEVER to stringResource(MR.strings.lock_never),
|
.toPersistentMap(),
|
||||||
AutoTrackState.ASK to stringResource(MR.strings.default_category_summary),
|
|
||||||
),
|
|
||||||
onValueChanged = {
|
|
||||||
autoTrackStatePref.set(it)
|
|
||||||
true
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
Preference.PreferenceGroup(
|
Preference.PreferenceGroup(
|
||||||
title = stringResource(MR.strings.services),
|
title = stringResource(MR.strings.services),
|
||||||
|
@ -736,9 +736,9 @@ class MangaScreenModel(
|
|||||||
chapters = chapters.toTypedArray(),
|
chapters = chapters.toTypedArray(),
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!read ||
|
if (
|
||||||
successState?.hasLoggedInTrackers == false ||
|
successState?.hasLoggedInTrackers == false ||
|
||||||
autoTrackState == AutoTrackState.NEVER
|
!read || autoTrackState == AutoTrackState.NEVER
|
||||||
) {
|
) {
|
||||||
return@launchIO
|
return@launchIO
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user