Improve FeatureFlagService API.
This commit is contained in:
parent
d2dfad7726
commit
de2a4bc8c6
6 changed files with 21 additions and 9 deletions
|
|
@ -40,7 +40,13 @@ class DefaultFeatureFlagService(
|
|||
?: false
|
||||
}
|
||||
|
||||
override fun getAvailableFeatures(): List<Feature> {
|
||||
return FeatureFlags.entries.filter { !it.isFinished }
|
||||
override fun getAvailableFeatures(
|
||||
includeFinishFeatures: Boolean,
|
||||
isInLabs: Boolean,
|
||||
): List<Feature> {
|
||||
return FeatureFlags.entries.filter { flag ->
|
||||
(includeFinishFeatures || !flag.isFinished) &&
|
||||
flag.isInLabs == isInLabs
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue