Skip to content

Commit

Permalink
Use setValue instead of configure in FeatureFlagSettingsDefinition (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
amk-stripe authored Nov 20, 2024
1 parent 90be5f8 commit ec8b681
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.stripe.android.paymentsheet.example.playground.settings

import com.stripe.android.core.utils.FeatureFlag
import com.stripe.android.paymentsheet.PaymentSheet
import com.stripe.android.paymentsheet.example.playground.PlaygroundState

internal class FeatureFlagSettingsDefinition(
private val featureFlag: FeatureFlag,
Expand All @@ -11,13 +9,8 @@ internal class FeatureFlagSettingsDefinition(
displayName = featureFlag.name,
defaultValue = false,
) {
override fun configure(
value: Boolean,
configurationBuilder: PaymentSheet.Configuration.Builder,
playgroundState: PlaygroundState.Payment,
configurationData: PlaygroundSettingDefinition.PaymentSheetConfigurationData
) {
super.configure(value, configurationBuilder, playgroundState, configurationData)
override fun setValue(value: Boolean) {
super.setValue(value)
featureFlag.setEnabled(value)
}
}

0 comments on commit ec8b681

Please sign in to comment.