Promote "history sharing on invite" out of developer options (#6647)
* Enable history sharing by default, unconditionally * Remove feature-flag dep from history viz icons in room header * Remove feature-flag dep from warning on inviting new people * Remove feature-flag dep from warning on starting chat with new people * Remove `enableKeyShareOnInvite` feature flag * Update screenshots * Remove redundant `FakeFeatureFlagService()` invocation, per review comment --------- Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
parent
92ee479e91
commit
289dfff50a
63 changed files with 106 additions and 206 deletions
|
|
@ -52,17 +52,6 @@ enum class FeatureFlags(
|
|||
defaultValue = { false },
|
||||
isFinished = false,
|
||||
),
|
||||
EnableKeyShareOnInvite(
|
||||
key = "feature.enableKeyShareOnInvite",
|
||||
title = "Share encrypted history with new members",
|
||||
description = "When inviting a user to an encrypted room that has history visibility set to \"shared\"," +
|
||||
" share encrypted history with that user, and accept encrypted history when you are invited to such a room." +
|
||||
"\nRequires an app restart to take effect." +
|
||||
"\n\nWARNING: this feature is EXPERIMENTAL and not all security precautions are implemented." +
|
||||
" Do not enable on production accounts.",
|
||||
defaultValue = { false },
|
||||
isFinished = false,
|
||||
),
|
||||
Knock(
|
||||
key = "feature.knock",
|
||||
title = "Ask to join",
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ class RustMatrixClientFactory(
|
|||
}
|
||||
)
|
||||
)
|
||||
.enableShareHistoryOnInvite(featureFlagService.isFeatureEnabled(FeatureFlags.EnableKeyShareOnInvite))
|
||||
.enableShareHistoryOnInvite(true)
|
||||
.threadsEnabled(featureFlagService.isFeatureEnabled(FeatureFlags.Threads), threadSubscriptions = false)
|
||||
.requestConfig(
|
||||
RequestConfig(
|
||||
|
|
|
|||
|
|
@ -54,18 +54,17 @@ import io.element.android.libraries.ui.strings.CommonStrings
|
|||
@Composable
|
||||
fun CreateDmConfirmationBottomSheet(
|
||||
matrixUser: MatrixUser,
|
||||
enableKeyShareOnInvite: Boolean,
|
||||
isUserIdentityUnknown: Boolean,
|
||||
onSendInvite: () -> Unit,
|
||||
onDismiss: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
val titleContent = if (enableKeyShareOnInvite && isUserIdentityUnknown) {
|
||||
val titleContent = if (isUserIdentityUnknown) {
|
||||
stringResource(R.string.screen_bottom_sheet_create_dm_unknown_user_title)
|
||||
} else {
|
||||
stringResource(R.string.screen_bottom_sheet_create_dm_title)
|
||||
}
|
||||
val descriptionContent = if (enableKeyShareOnInvite && isUserIdentityUnknown) {
|
||||
val descriptionContent = if (isUserIdentityUnknown) {
|
||||
stringResource(R.string.screen_bottom_sheet_create_dm_unknown_user_content)
|
||||
} else {
|
||||
stringResource(R.string.screen_bottom_sheet_create_dm_message, matrixUser.getFullName())
|
||||
|
|
@ -154,7 +153,6 @@ internal fun CreateDmConfirmationBottomSheetPreview(@PreviewParameter(
|
|||
) state: CreateDmConfirmationBottomSheetState) = ElementPreview {
|
||||
CreateDmConfirmationBottomSheet(
|
||||
matrixUser = state.matrixUser,
|
||||
enableKeyShareOnInvite = state.enableKeyShareOnInvite,
|
||||
isUserIdentityUnknown = state.isUserIdentityUnknown,
|
||||
onSendInvite = {},
|
||||
onDismiss = {},
|
||||
|
|
@ -163,14 +161,12 @@ internal fun CreateDmConfirmationBottomSheetPreview(@PreviewParameter(
|
|||
|
||||
data class CreateDmConfirmationBottomSheetState(
|
||||
val matrixUser: MatrixUser,
|
||||
val enableKeyShareOnInvite: Boolean,
|
||||
val isUserIdentityUnknown: Boolean,
|
||||
)
|
||||
|
||||
class CreateDmConfirmationBottomSheetStateProvider : PreviewParameterProvider<CreateDmConfirmationBottomSheetState> {
|
||||
override val values = sequenceOf(
|
||||
CreateDmConfirmationBottomSheetState(matrixUser = aMatrixUser(), enableKeyShareOnInvite = false, isUserIdentityUnknown = false),
|
||||
CreateDmConfirmationBottomSheetState(matrixUser = aMatrixUser(), enableKeyShareOnInvite = true, isUserIdentityUnknown = false),
|
||||
CreateDmConfirmationBottomSheetState(matrixUser = aMatrixUser(), enableKeyShareOnInvite = true, isUserIdentityUnknown = true),
|
||||
CreateDmConfirmationBottomSheetState(matrixUser = aMatrixUser(), isUserIdentityUnknown = false),
|
||||
CreateDmConfirmationBottomSheetState(matrixUser = aMatrixUser(), isUserIdentityUnknown = true),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue