8f4bc71cf7
Redundant with predictive back, but also just sort of pointless since it doesn't help with any sort of app state retention.
28 lines
950 B
Kotlin
28 lines
950 B
Kotlin
package eu.kanade.domain.base
|
|
|
|
import android.content.Context
|
|
import eu.kanade.tachiyomi.R
|
|
import eu.kanade.tachiyomi.util.system.isPreviewBuildType
|
|
import eu.kanade.tachiyomi.util.system.isReleaseBuildType
|
|
import tachiyomi.core.preference.PreferenceStore
|
|
|
|
class BasePreferences(
|
|
val context: Context,
|
|
private val preferenceStore: PreferenceStore,
|
|
) {
|
|
|
|
fun downloadedOnly() = preferenceStore.getBoolean("pref_downloaded_only", false)
|
|
|
|
fun incognitoMode() = preferenceStore.getBoolean("incognito_mode", false)
|
|
|
|
fun extensionInstaller() = ExtensionInstallerPreference(context, preferenceStore)
|
|
|
|
fun acraEnabled() = preferenceStore.getBoolean("acra.enable", isPreviewBuildType || isReleaseBuildType)
|
|
|
|
enum class ExtensionInstaller(val titleResId: Int) {
|
|
LEGACY(R.string.ext_installer_legacy),
|
|
PACKAGEINSTALLER(R.string.ext_installer_packageinstaller),
|
|
SHIZUKU(R.string.ext_installer_shizuku),
|
|
}
|
|
}
|