mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-25 18:19:26 +03:00
renaming parameters and properties to avoid clashing with kotlin/java8 keywords
This commit is contained in:
parent
12abd3b019
commit
41f931e466
3 changed files with 11 additions and 11 deletions
|
@ -42,14 +42,14 @@ abstract class BooleanFeatureItem : VectorEpoxyModel<BooleanFeatureItem.Holder>(
|
||||||
holder.optionsSpinner.apply {
|
holder.optionsSpinner.apply {
|
||||||
val arrayAdapter = ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item)
|
val arrayAdapter = ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item)
|
||||||
val options = listOf(
|
val options = listOf(
|
||||||
"DEFAULT - ${feature.default.toEmoji()}",
|
"DEFAULT - ${feature.featureDefault.toEmoji()}",
|
||||||
"✅",
|
"✅",
|
||||||
"❌"
|
"❌"
|
||||||
)
|
)
|
||||||
arrayAdapter.addAll(options)
|
arrayAdapter.addAll(options)
|
||||||
adapter = arrayAdapter
|
adapter = arrayAdapter
|
||||||
|
|
||||||
feature.override?.let {
|
feature.featureOverride?.let {
|
||||||
setSelection(options.indexOf(it.toEmoji()), false)
|
setSelection(options.indexOf(it.toEmoji()), false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,26 +28,26 @@ class DebugFeaturesStateFactory @Inject constructor(
|
||||||
return FeaturesState(listOf(
|
return FeaturesState(listOf(
|
||||||
createEnumFeature(
|
createEnumFeature(
|
||||||
label = "Onboarding variant",
|
label = "Onboarding variant",
|
||||||
override = debugFeatures.onboardingVariant(),
|
featureOverride = debugFeatures.onboardingVariant(),
|
||||||
default = defaultFeatures.onboardingVariant()
|
featureDefault = defaultFeatures.onboardingVariant()
|
||||||
),
|
),
|
||||||
|
|
||||||
Feature.BooleanFeature(
|
Feature.BooleanFeature(
|
||||||
label = "FTUE Splash - I already have an account",
|
label = "FTUE Splash - I already have an account",
|
||||||
override = debugFeatures.isAlreadyHaveAccountSplashEnabled().takeIf {
|
featureOverride = debugFeatures.isAlreadyHaveAccountSplashEnabled().takeIf {
|
||||||
debugFeatures.hasOverride(DebugFeatureKeys.alreadyHaveAnAccount)
|
debugFeatures.hasOverride(DebugFeatureKeys.alreadyHaveAnAccount)
|
||||||
},
|
},
|
||||||
default = defaultFeatures.isAlreadyHaveAccountSplashEnabled(),
|
featureDefault = defaultFeatures.isAlreadyHaveAccountSplashEnabled(),
|
||||||
key = DebugFeatureKeys.alreadyHaveAnAccount
|
key = DebugFeatureKeys.alreadyHaveAnAccount
|
||||||
)
|
)
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
private inline fun <reified T : Enum<T>> createEnumFeature(label: String, override: T, default: T): Feature {
|
private inline fun <reified T : Enum<T>> createEnumFeature(label: String, featureOverride: T, featureDefault: T): Feature {
|
||||||
return Feature.EnumFeature(
|
return Feature.EnumFeature(
|
||||||
label = label,
|
label = label,
|
||||||
override = override.takeIf { debugFeatures.hasEnumOverride(T::class) },
|
override = featureOverride.takeIf { debugFeatures.hasEnumOverride(T::class) },
|
||||||
default = default,
|
default = featureDefault,
|
||||||
options = enumValues<T>().toList(),
|
options = enumValues<T>().toList(),
|
||||||
type = T::class
|
type = T::class
|
||||||
)
|
)
|
||||||
|
|
|
@ -37,8 +37,8 @@ sealed interface Feature {
|
||||||
|
|
||||||
data class BooleanFeature(
|
data class BooleanFeature(
|
||||||
val label: String,
|
val label: String,
|
||||||
val override: Boolean?,
|
val featureOverride: Boolean?,
|
||||||
val default: Boolean,
|
val featureDefault: Boolean,
|
||||||
val key: Preferences.Key<Boolean>
|
val key: Preferences.Key<Boolean>
|
||||||
) : Feature
|
) : Feature
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue