ui: file & media preference for groups (#3243)
This commit is contained in:
parent
d8d47d706d
commit
29c8ab7c9b
@ -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 {
|
||||||
|
@ -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(
|
||||||
|
Loading…
Reference in New Issue
Block a user