Make a diff between FeatureFlags.defaultValue and value returned by StaticFeatureFlagProvider.isFeatureEnabled().
Iterate after Ganfra's review.
This commit is contained in:
parent
aacfa0d83a
commit
762a03259b
2 changed files with 9 additions and 3 deletions
|
|
@ -22,7 +22,7 @@ import javax.inject.Inject
|
|||
|
||||
/**
|
||||
* This provider is used for release build.
|
||||
* [isFeatureEnabled] just returns the default value of the FeatureFlags.
|
||||
* This is the place to enable or disable feature for the release build.
|
||||
*/
|
||||
class StaticFeatureFlagProvider @Inject constructor() :
|
||||
FeatureFlagProvider {
|
||||
|
|
@ -31,7 +31,11 @@ class StaticFeatureFlagProvider @Inject constructor() :
|
|||
|
||||
override suspend fun isFeatureEnabled(feature: Feature): Boolean {
|
||||
return if (feature is FeatureFlags) {
|
||||
feature.defaultValue
|
||||
when(feature) {
|
||||
FeatureFlags.LocationSharing -> true
|
||||
FeatureFlags.Polls -> true
|
||||
FeatureFlags.NotificationSettings -> false
|
||||
}
|
||||
} else {
|
||||
false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue