Remove FF SpaceSettings
This commit is contained in:
parent
cac4dad920
commit
2a1f706591
7 changed files with 4 additions and 61 deletions
|
|
@ -78,9 +78,6 @@ class SecurityAndPrivacyPresenter(
|
|||
val isKnockEnabled by remember {
|
||||
featureFlagService.isFeatureEnabledFlow(FeatureFlags.Knock)
|
||||
}.collectAsState(false)
|
||||
val isSpaceSettingsEnabled by remember {
|
||||
featureFlagService.isFeatureEnabledFlow(FeatureFlags.SpaceSettings)
|
||||
}.collectAsState(false)
|
||||
|
||||
val saveAction = remember { mutableStateOf<AsyncAction<Unit>>(AsyncAction.Uninitialized) }
|
||||
val homeserverName = remember { matrixClient.userIdServerName() }
|
||||
|
|
@ -248,7 +245,6 @@ class SecurityAndPrivacyPresenter(
|
|||
saveAction = saveAction.value,
|
||||
permissions = permissions,
|
||||
isSpace = roomInfo.isSpace,
|
||||
isSpaceSettingsEnabled = isSpaceSettingsEnabled,
|
||||
selectableJoinedSpaces = selectableJoinedSpaces,
|
||||
spaceSelectionMode = spaceSelectionMode,
|
||||
eventSink = ::handleEvent,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ data class SecurityAndPrivacyState(
|
|||
val homeserverName: String,
|
||||
val showEnableEncryptionConfirmation: Boolean,
|
||||
private val isKnockEnabled: Boolean,
|
||||
private val isSpaceSettingsEnabled: Boolean,
|
||||
val saveAction: AsyncAction<Unit>,
|
||||
val isSpace: Boolean,
|
||||
private val permissions: SecurityAndPrivacyPermissions,
|
||||
|
|
@ -37,7 +36,7 @@ data class SecurityAndPrivacyState(
|
|||
private val spaceSelectionMode: SpaceSelectionMode,
|
||||
val eventSink: (SecurityAndPrivacyEvent) -> Unit
|
||||
) {
|
||||
val isSpaceMemberSelectable = isSpaceSettingsEnabled && spaceSelectionMode != SpaceSelectionMode.None
|
||||
val isSpaceMemberSelectable = spaceSelectionMode != SpaceSelectionMode.None
|
||||
|
||||
// Show SpaceMember option in two cases:
|
||||
// - SpaceMember is the current saved value
|
||||
|
|
|
|||
|
|
@ -138,7 +138,6 @@ fun aSecurityAndPrivacyState(
|
|||
isSpace: Boolean = false,
|
||||
selectableJoinedSpaces: Set<SpaceRoom> = emptySet(),
|
||||
spaceSelectionMode: SpaceSelectionMode = SpaceSelectionMode.None,
|
||||
isSpaceSettingsEnabled: Boolean = true,
|
||||
eventSink: (SecurityAndPrivacyEvent) -> Unit = {}
|
||||
) = SecurityAndPrivacyState(
|
||||
editedSettings = editedSettings,
|
||||
|
|
@ -151,6 +150,5 @@ fun aSecurityAndPrivacyState(
|
|||
isSpace = isSpace,
|
||||
selectableJoinedSpaces = selectableJoinedSpaces.toImmutableSet(),
|
||||
spaceSelectionMode = spaceSelectionMode,
|
||||
isSpaceSettingsEnabled = isSpaceSettingsEnabled,
|
||||
eventSink = eventSink,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -416,11 +416,6 @@ class SecurityAndPrivacyPresenterTest {
|
|||
val presenter = createSecurityAndPrivacyPresenter(
|
||||
room = room,
|
||||
matrixClient = client,
|
||||
featureFlagService = FakeFeatureFlagService(
|
||||
initialState = mapOf(
|
||||
FeatureFlags.SpaceSettings.key to true,
|
||||
)
|
||||
)
|
||||
)
|
||||
presenter.test {
|
||||
skipItems(1)
|
||||
|
|
@ -461,11 +456,6 @@ class SecurityAndPrivacyPresenterTest {
|
|||
room = room,
|
||||
navigator = navigator,
|
||||
matrixClient = client,
|
||||
featureFlagService = FakeFeatureFlagService(
|
||||
initialState = mapOf(
|
||||
FeatureFlags.SpaceSettings.key to true,
|
||||
)
|
||||
)
|
||||
)
|
||||
presenter.test {
|
||||
skipItems(1)
|
||||
|
|
@ -587,7 +577,6 @@ class SecurityAndPrivacyPresenterTest {
|
|||
featureFlagService = FakeFeatureFlagService(
|
||||
initialState = mapOf(
|
||||
FeatureFlags.Knock.key to true,
|
||||
FeatureFlags.SpaceSettings.key to true,
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
@ -633,7 +622,6 @@ class SecurityAndPrivacyPresenterTest {
|
|||
featureFlagService = FakeFeatureFlagService(
|
||||
initialState = mapOf(
|
||||
FeatureFlags.Knock.key to true,
|
||||
FeatureFlags.SpaceSettings.key to true,
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
@ -859,9 +847,6 @@ class SecurityAndPrivacyPresenterTest {
|
|||
val presenter = createSecurityAndPrivacyPresenter(
|
||||
room = room,
|
||||
matrixClient = client,
|
||||
featureFlagService = FakeFeatureFlagService(
|
||||
initialState = mapOf(FeatureFlags.SpaceSettings.key to true)
|
||||
)
|
||||
)
|
||||
presenter.test {
|
||||
skipItems(1)
|
||||
|
|
@ -901,9 +886,6 @@ class SecurityAndPrivacyPresenterTest {
|
|||
val presenter = createSecurityAndPrivacyPresenter(
|
||||
room = room,
|
||||
matrixClient = client,
|
||||
featureFlagService = FakeFeatureFlagService(
|
||||
initialState = mapOf(FeatureFlags.SpaceSettings.key to true)
|
||||
)
|
||||
)
|
||||
presenter.test {
|
||||
skipItems(1)
|
||||
|
|
@ -975,7 +957,6 @@ class SecurityAndPrivacyPresenterTest {
|
|||
featureFlagService = FakeFeatureFlagService(
|
||||
initialState = mapOf(
|
||||
FeatureFlags.Knock.key to true,
|
||||
FeatureFlags.SpaceSettings.key to true,
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue