mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Add feature flag for polls (#1064)
* Handle poll events from the sdk * Render started poll event in the timeline * Create poll module * Check poll kind before revealing the results * Check if user has voted before revealing the results * Add active poll previews * Minor cleanup * Update todos * Fix CI * Remove hardcoded string * Update preview * changelog file * Update screenshots * Use CommonPlurals * Set poll root view as selectableGroup * Improve poll result rendering * Update screenshots * Add missing showkase processor * Update screenshots * Add feature flag for polls * Add supporting text in PreferenceCheckbox * Render poll events if feature flag is enabled * changelog * Update screenshots * Fix tests * Move feature flag check to poll factory --------- Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
+1
@@ -54,6 +54,7 @@ fun FeaturePreferenceView(
|
||||
) {
|
||||
PreferenceCheckbox(
|
||||
title = feature.title,
|
||||
supportingText = feature.description,
|
||||
isChecked = feature.isEnabled,
|
||||
modifier = modifier,
|
||||
onCheckedChange = onCheckedChange
|
||||
|
||||
+1
@@ -19,5 +19,6 @@ package io.element.android.libraries.featureflag.ui.model
|
||||
data class FeatureUiModel(
|
||||
val key: String,
|
||||
val title: String,
|
||||
val description: String?,
|
||||
val isEnabled: Boolean
|
||||
)
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ import kotlinx.collections.immutable.persistentListOf
|
||||
|
||||
fun aFeatureUiModelList(): ImmutableList<FeatureUiModel> {
|
||||
return persistentListOf(
|
||||
FeatureUiModel("key1", "Display State Events", true),
|
||||
FeatureUiModel("key2", "Display Room Events", false)
|
||||
FeatureUiModel("key1", "Display State Events", "Show state events in the timeline", true),
|
||||
FeatureUiModel("key2", "Display Room Events", null, false),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user