mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Improve FeatureFlagService API.
This commit is contained in:
committed by
Benoit Marty
parent
d2dfad7726
commit
de2a4bc8c6
+8
-2
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user