mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-10 12:47:26 +01:00
Hide reader "Split tall images" option in release build (#8235)
This commit is contained in:
parent
a8ca7b690f
commit
44cabf2f0b
@ -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.OrientationType
|
||||||
import eu.kanade.tachiyomi.ui.reader.setting.ReaderPreferences
|
import eu.kanade.tachiyomi.ui.reader.setting.ReaderPreferences
|
||||||
import eu.kanade.tachiyomi.ui.reader.setting.ReadingModeType
|
import eu.kanade.tachiyomi.ui.reader.setting.ReadingModeType
|
||||||
|
import eu.kanade.tachiyomi.util.system.isReleaseFlavor
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
import uy.kohesive.injekt.api.get
|
||||||
|
|
||||||
@ -293,6 +294,7 @@ class SettingsReaderScreen : SearchableSettings {
|
|||||||
pref = readerPreferences.longStripSplitWebtoon(),
|
pref = readerPreferences.longStripSplitWebtoon(),
|
||||||
title = stringResource(R.string.pref_long_strip_split),
|
title = stringResource(R.string.pref_long_strip_split),
|
||||||
subtitle = stringResource(R.string.split_tall_images_summary),
|
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.PreferenceStore
|
||||||
import eu.kanade.tachiyomi.core.preference.getEnum
|
import eu.kanade.tachiyomi.core.preference.getEnum
|
||||||
import eu.kanade.tachiyomi.data.preference.PreferenceValues
|
import eu.kanade.tachiyomi.data.preference.PreferenceValues
|
||||||
|
import eu.kanade.tachiyomi.util.system.isReleaseFlavor
|
||||||
|
|
||||||
class ReaderPreferences(
|
class ReaderPreferences(
|
||||||
private val preferenceStore: PreferenceStore,
|
private val preferenceStore: PreferenceStore,
|
||||||
@ -30,7 +31,8 @@ class ReaderPreferences(
|
|||||||
|
|
||||||
fun defaultOrientationType() = preferenceStore.getInt("pref_default_orientation_type_key", OrientationType.FREE.flagValue)
|
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)
|
fun imageScaleType() = preferenceStore.getInt("pref_image_scale_type_key", 1)
|
||||||
|
|
||||||
|
@ -4,3 +4,6 @@ import eu.kanade.tachiyomi.BuildConfig
|
|||||||
|
|
||||||
val isDevFlavor: Boolean
|
val isDevFlavor: Boolean
|
||||||
get() = BuildConfig.FLAVOR == "dev"
|
get() = BuildConfig.FLAVOR == "dev"
|
||||||
|
|
||||||
|
val isReleaseFlavor: Boolean
|
||||||
|
get() = BuildConfig.BUILD_TYPE == "release"
|
||||||
|
Loading…
Reference in New Issue
Block a user