* Update image-decoder, color management * move display profile pref * remove true color pref * Move Display Profile settings to a new section * Partially revert "remove true color pref" This partially reverts commit e1a75816950e100936699279e1618adb2fa341aa. * Tweak label --------- Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> (cherry picked from commit 3f2c8e9ef6db540c77b818ffdf771674b3e46c8b) # Conflicts: # app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsAdvancedScreen.kt # app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsReaderScreen.kt # app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt # gradle/libs.versions.toml
37 lines
1.4 KiB
Kotlin
37 lines
1.4 KiB
Kotlin
package eu.kanade.domain.base
|
|
|
|
import android.content.Context
|
|
import dev.icerock.moko.resources.StringResource
|
|
import eu.kanade.tachiyomi.util.system.isPreviewBuildType
|
|
import eu.kanade.tachiyomi.util.system.isReleaseBuildType
|
|
import tachiyomi.core.common.preference.Preference
|
|
import tachiyomi.core.common.preference.PreferenceStore
|
|
import tachiyomi.i18n.MR
|
|
|
|
class BasePreferences(
|
|
val context: Context,
|
|
private val preferenceStore: PreferenceStore,
|
|
) {
|
|
|
|
fun downloadedOnly() = preferenceStore.getBoolean(
|
|
Preference.appStateKey("pref_downloaded_only"),
|
|
false,
|
|
)
|
|
|
|
fun incognitoMode() = preferenceStore.getBoolean(Preference.appStateKey("incognito_mode"), false)
|
|
|
|
fun extensionInstaller() = ExtensionInstallerPreference(context, preferenceStore)
|
|
|
|
fun acraEnabled() = preferenceStore.getBoolean("acra.enable", isPreviewBuildType || isReleaseBuildType)
|
|
|
|
fun shownOnboardingFlow() = preferenceStore.getBoolean(Preference.appStateKey("onboarding_complete"), false)
|
|
|
|
enum class ExtensionInstaller(val titleRes: StringResource, val requiresSystemPermission: Boolean) {
|
|
LEGACY(MR.strings.ext_installer_legacy, true),
|
|
PACKAGEINSTALLER(MR.strings.ext_installer_packageinstaller, true),
|
|
SHIZUKU(MR.strings.ext_installer_shizuku, false),
|
|
PRIVATE(MR.strings.ext_installer_private, false),
|
|
}
|
|
|
|
fun displayProfile() = preferenceStore.getString("pref_display_profile_key", "")
|
|
}
|