ui: file & media preference for groups (#3243)

This commit is contained in:
Evgeny Poberezkin 2023-10-17 18:05:16 +01:00 committed by GitHub
parent d8d47d706d
commit 29c8ab7c9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View File

@ -27,8 +27,7 @@ struct GroupPreferencesView: View {
featureSection(.directMessages, $preferences.directMessages.enable) featureSection(.directMessages, $preferences.directMessages.enable)
featureSection(.reactions, $preferences.reactions.enable) featureSection(.reactions, $preferences.reactions.enable)
featureSection(.voice, $preferences.voice.enable) featureSection(.voice, $preferences.voice.enable)
// TODO uncomment in 5.3 featureSection(.files, $preferences.files.enable)
// featureSection(.files, $preferences.files.enable)
if groupInfo.canEdit { if groupInfo.canEdit {
Section { Section {

View File

@ -103,12 +103,11 @@ private fun GroupPreferencesLayout(
FeatureSection(GroupFeature.Voice, allowVoice, groupInfo, preferences, onTTLUpdated) { FeatureSection(GroupFeature.Voice, allowVoice, groupInfo, preferences, onTTLUpdated) {
applyPrefs(preferences.copy(voice = GroupPreference(enable = it))) applyPrefs(preferences.copy(voice = GroupPreference(enable = it)))
} }
// TODO uncomment in 5.3 SectionDividerSpaced(true, maxBottomPadding = false)
// SectionDividerSpaced(true, maxBottomPadding = false) val allowFiles = remember(preferences) { mutableStateOf(preferences.files.enable) }
// val allowFiles = remember(preferences) { mutableStateOf(preferences.files.enable) } FeatureSection(GroupFeature.Files, allowFiles, groupInfo, preferences, onTTLUpdated) {
// FeatureSection(GroupFeature.Files, allowFiles, groupInfo, preferences, onTTLUpdated) { applyPrefs(preferences.copy(files = GroupPreference(enable = it)))
// applyPrefs(preferences.copy(files = GroupPreference(enable = it))) }
// }
if (groupInfo.canEdit) { if (groupInfo.canEdit) {
SectionDividerSpaced(maxTopPadding = true, maxBottomPadding = false) SectionDividerSpaced(maxTopPadding = true, maxBottomPadding = false)
ResetSaveButtons( ResetSaveButtons(