We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be great to have the ability to simply create complex flipper configs compositions.
We have three configs (in order of priority):
debug
remote
local
If value not found in debug config, it will get from remote config. If value not configured in remote config it will get from local.
class LocalFlipperConfig() : FlipperConfig { /*...*/ } class RemoteFlipperConfig(localConfig: LocalFlipperConfig) : FlipperConfig { override fun featureIsEnabled(feature: Feature): Boolean { return if (hasValue(feature.id)) ... else localConfig.featureIsEnabled(feature) } } class DebugFlipperConfig(remoteConfig: RemoteFlipperConfig) : FlipperConfig { override fun featureIsEnabled(feature: Feature): Boolean { return if (hasValue(feature.id)) ... else remoteConfig.featureIsEnabled(feature) } } ToggleRouter.init(DebugFlipperConfig(RemoteFlipperConfig(LocalFlipperConfig())))
class LocalFlipperConfig() : FlipperConfig { /*...*/ } class RemoteFlipperConfig() : FlipperConfig { /*...*/ } class DebugFlipperConfig() : FlipperConfig { /*...*/ } ToggleRouter.init( DebugFlipperConfig(), RemoteFlipperConfig(), LocalFlipperConfig() )
The text was updated successfully, but these errors were encountered:
One of the ways I see - add method contains to FlipperConfig. Iterate over all configs and check if it contains the desired feature.
contains
FlipperConfig
Sorry, something went wrong.
Fi5t
No branches or pull requests
It would be great to have the ability to simply create complex flipper configs compositions.
We have three configs (in order of priority):
debug
- configured from in-app debug panelremote
- values from Firebase remote configlocal
- hardcoded default valuesIf value not found in
debug
config, it will get fromremote
config. If value not configured inremote
config it will get fromlocal
.Our current solution
Desired solution
The text was updated successfully, but these errors were encountered: