To avoid mistake, FeatureFlags does not have defaultValue set to true, and StaticFeatureFlagProvider return the default value.

This fixes #1241.
This commit is contained in:
Benoit Marty 2023-09-07 10:44:32 +02:00
parent c16c875e68
commit aacfa0d83a
3 changed files with 10 additions and 8 deletions

View file

@ -16,21 +16,26 @@
package io.element.android.libraries.featureflag.api
/**
* To enable or disable a FeatureFlags, change the `defaultValue` value.
* It will impact all the build types.
*/
enum class FeatureFlags(
override val key: String,
override val title: String,
override val description: String? = null,
override val defaultValue: Boolean = true
override val defaultValue: Boolean
) : Feature {
LocationSharing(
key = "feature.locationsharing",
title = "Allow user to share location",
defaultValue = true,
),
Polls(
key = "feature.polls",
title = "Polls",
description = "Create poll and render poll events in the timeline",
defaultValue = false,
defaultValue = true,
),
NotificationSettings(
key = "feature.notificationsettings",