mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-23 05:35:51 +03:00
Hide reader "Split tall images" option in release build (#8235)
This commit is contained in:
parent
a8ca7b690f
commit
44cabf2f0b
3 changed files with 8 additions and 1 deletions
|
@ -17,6 +17,7 @@ import eu.kanade.tachiyomi.data.preference.PreferenceValues.TappingInvertMode
|
|||
import eu.kanade.tachiyomi.ui.reader.setting.OrientationType
|
||||
import eu.kanade.tachiyomi.ui.reader.setting.ReaderPreferences
|
||||
import eu.kanade.tachiyomi.ui.reader.setting.ReadingModeType
|
||||
import eu.kanade.tachiyomi.util.system.isReleaseFlavor
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
|
||||
|
@ -293,6 +294,7 @@ class SettingsReaderScreen : SearchableSettings {
|
|||
pref = readerPreferences.longStripSplitWebtoon(),
|
||||
title = stringResource(R.string.pref_long_strip_split),
|
||||
subtitle = stringResource(R.string.split_tall_images_summary),
|
||||
enabled = !isReleaseFlavor, // TODO: Show in release build when the feature is stable
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
@ -3,6 +3,7 @@ package eu.kanade.tachiyomi.ui.reader.setting
|
|||
import eu.kanade.tachiyomi.core.preference.PreferenceStore
|
||||
import eu.kanade.tachiyomi.core.preference.getEnum
|
||||
import eu.kanade.tachiyomi.data.preference.PreferenceValues
|
||||
import eu.kanade.tachiyomi.util.system.isReleaseFlavor
|
||||
|
||||
class ReaderPreferences(
|
||||
private val preferenceStore: PreferenceStore,
|
||||
|
@ -30,7 +31,8 @@ class ReaderPreferences(
|
|||
|
||||
fun defaultOrientationType() = preferenceStore.getInt("pref_default_orientation_type_key", OrientationType.FREE.flagValue)
|
||||
|
||||
fun longStripSplitWebtoon() = preferenceStore.getBoolean("pref_long_strip_split_webtoon", true)
|
||||
// TODO: Enable in release build when the feature is stable
|
||||
fun longStripSplitWebtoon() = preferenceStore.getBoolean("pref_long_strip_split_webtoon", !isReleaseFlavor)
|
||||
|
||||
fun imageScaleType() = preferenceStore.getInt("pref_image_scale_type_key", 1)
|
||||
|
||||
|
|
|
@ -4,3 +4,6 @@ import eu.kanade.tachiyomi.BuildConfig
|
|||
|
||||
val isDevFlavor: Boolean
|
||||
get() = BuildConfig.FLAVOR == "dev"
|
||||
|
||||
val isReleaseFlavor: Boolean
|
||||
get() = BuildConfig.BUILD_TYPE == "release"
|
||||
|
|
Loading…
Reference in a new issue