Skip to content

Commit

Permalink
ui: show UI for additional group preferences (SimpleX links and per-r…
Browse files Browse the repository at this point in the history
…ole permissions)
  • Loading branch information
epoberezkin committed May 25, 2024
1 parent a03ccd0 commit 373070f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
5 changes: 1 addition & 4 deletions apps/ios/Shared/Views/Chat/Group/GroupPreferencesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ struct GroupPreferencesView: View {
featureSection(.reactions, $preferences.reactions.enable)
featureSection(.voice, $preferences.voice.enable, $preferences.voice.role)
featureSection(.files, $preferences.files.enable, $preferences.files.role)
// TODO enable simplexLinks preference in 5.8
// featureSection(.simplexLinks, $preferences.simplexLinks.enable, $preferences.simplexLinks.role)
featureSection(.simplexLinks, $preferences.simplexLinks.enable, $preferences.simplexLinks.role)
featureSection(.history, $preferences.history.enable)

if groupInfo.canEdit {
Expand Down Expand Up @@ -102,8 +101,6 @@ struct GroupPreferencesView: View {
}
}
.frame(height: 36)
// remove in v5.8
.disabled(true)
}
} else {
settingsRow(icon, color: color) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,12 @@ private fun GroupPreferencesLayout(
applyPrefs(preferences.copy(files = RoleGroupPreference(enable = enable, role)))
}

// TODO enable simplexLinks preference in 5.8
// SectionDividerSpaced(true, maxBottomPadding = false)
// val allowSimplexLinks = remember(preferences) { mutableStateOf(preferences.simplexLinks.enable) }
// val simplexLinksRole = remember(preferences) { mutableStateOf(preferences.simplexLinks.role) }
// FeatureSection(GroupFeature.SimplexLinks, allowSimplexLinks, simplexLinksRole, groupInfo, preferences, onTTLUpdated) { enable, role ->
// applyPrefs(preferences.copy(simplexLinks = RoleGroupPreference(enable = enable, role)))
// }
SectionDividerSpaced(true, maxBottomPadding = false)
val allowSimplexLinks = remember(preferences) { mutableStateOf(preferences.simplexLinks.enable) }
val simplexLinksRole = remember(preferences) { mutableStateOf(preferences.simplexLinks.role) }
FeatureSection(GroupFeature.SimplexLinks, allowSimplexLinks, simplexLinksRole, groupInfo, preferences, onTTLUpdated) { enable, role ->
applyPrefs(preferences.copy(simplexLinks = RoleGroupPreference(enable = enable, role)))
}

SectionDividerSpaced(true, maxBottomPadding = false)
val enableHistory = remember(preferences) { mutableStateOf(preferences.history.enable) }
Expand Down Expand Up @@ -189,8 +188,6 @@ private fun FeatureSection(
generalGetString(MR.strings.feature_enabled_for),
featureRoles,
enableForRole,
// remove in v5.8
enabled = remember { mutableStateOf(false) },
onSelected = { value ->
onSelected(enableFeature.value, value)
}
Expand Down

0 comments on commit 373070f

Please sign in to comment.