mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-28 20:29:53 +00:00
mobile: hide full delete preferences (#1438)
This commit is contained in:
parent
9c06acd4bc
commit
336a170b3a
6 changed files with 18 additions and 18 deletions
|
@ -72,11 +72,11 @@ private fun ContactPreferencesLayout(
|
|||
horizontalAlignment = Alignment.Start,
|
||||
) {
|
||||
AppBarTitle(stringResource(R.string.contact_preferences))
|
||||
val allowFullDeletion: MutableState<ContactFeatureAllowed> = remember(featuresAllowed) { mutableStateOf(featuresAllowed.fullDelete) }
|
||||
FeatureSection(Feature.FullDelete, user.fullPreferences.fullDelete.allow, contact.mergedPreferences.fullDelete, allowFullDeletion) {
|
||||
applyPrefs(featuresAllowed.copy(fullDelete = it))
|
||||
}
|
||||
SectionSpacer()
|
||||
// val allowFullDeletion: MutableState<ContactFeatureAllowed> = remember(featuresAllowed) { mutableStateOf(featuresAllowed.fullDelete) }
|
||||
// FeatureSection(Feature.FullDelete, user.fullPreferences.fullDelete.allow, contact.mergedPreferences.fullDelete, allowFullDeletion) {
|
||||
// applyPrefs(featuresAllowed.copy(fullDelete = it))
|
||||
// }
|
||||
// SectionSpacer()
|
||||
val allowVoice: MutableState<ContactFeatureAllowed> = remember(featuresAllowed) { mutableStateOf(featuresAllowed.voice) }
|
||||
FeatureSection(Feature.Voice, user.fullPreferences.voice.allow, contact.mergedPreferences.voice, allowVoice) {
|
||||
applyPrefs(featuresAllowed.copy(voice = it))
|
||||
|
|
|
@ -60,11 +60,11 @@ private fun GroupPreferencesLayout(
|
|||
horizontalAlignment = Alignment.Start,
|
||||
) {
|
||||
AppBarTitle(stringResource(R.string.group_preferences))
|
||||
val allowFullDeletion = remember(preferences) { mutableStateOf(preferences.fullDelete.enable) }
|
||||
FeatureSection(Feature.FullDelete, allowFullDeletion, groupInfo) {
|
||||
applyPrefs(preferences.copy(fullDelete = GroupPreference(enable = it)))
|
||||
}
|
||||
SectionSpacer()
|
||||
// val allowFullDeletion = remember(preferences) { mutableStateOf(preferences.fullDelete.enable) }
|
||||
// FeatureSection(Feature.FullDelete, allowFullDeletion, groupInfo) {
|
||||
// applyPrefs(preferences.copy(fullDelete = GroupPreference(enable = it)))
|
||||
// }
|
||||
// SectionSpacer()
|
||||
val allowVoice = remember(preferences) { mutableStateOf(preferences.voice.enable) }
|
||||
FeatureSection(Feature.Voice, allowVoice, groupInfo) {
|
||||
applyPrefs(preferences.copy(voice = GroupPreference(enable = it)))
|
||||
|
|
|
@ -61,11 +61,11 @@ private fun PreferencesLayout(
|
|||
horizontalAlignment = Alignment.Start,
|
||||
) {
|
||||
AppBarTitle(stringResource(R.string.your_preferences))
|
||||
val allowFullDeletion = remember(preferences) { mutableStateOf(preferences.fullDelete.allow) }
|
||||
FeatureSection(Feature.FullDelete, allowFullDeletion) {
|
||||
applyPrefs(preferences.copy(fullDelete = ChatPreference(allow = it)))
|
||||
}
|
||||
SectionSpacer()
|
||||
// val allowFullDeletion = remember(preferences) { mutableStateOf(preferences.fullDelete.allow) }
|
||||
// FeatureSection(Feature.FullDelete, allowFullDeletion) {
|
||||
// applyPrefs(preferences.copy(fullDelete = ChatPreference(allow = it)))
|
||||
// }
|
||||
// SectionSpacer()
|
||||
val allowVoice = remember(preferences) { mutableStateOf(preferences.voice.allow) }
|
||||
FeatureSection(Feature.Voice, allowVoice) {
|
||||
applyPrefs(preferences.copy(voice = ChatPreference(allow = it)))
|
||||
|
|
|
@ -20,7 +20,7 @@ struct ContactPreferencesView: View {
|
|||
|
||||
VStack {
|
||||
List {
|
||||
featureSection(.fullDelete, user.fullPreferences.fullDelete.allow, contact.mergedPreferences.fullDelete, $featuresAllowed.fullDelete)
|
||||
// featureSection(.fullDelete, user.fullPreferences.fullDelete.allow, contact.mergedPreferences.fullDelete, $featuresAllowed.fullDelete)
|
||||
featureSection(.voice, user.fullPreferences.voice.allow, contact.mergedPreferences.voice, $featuresAllowed.voice)
|
||||
|
||||
Section {
|
||||
|
|
|
@ -18,7 +18,7 @@ struct GroupPreferencesView: View {
|
|||
var body: some View {
|
||||
VStack {
|
||||
List {
|
||||
featureSection(.fullDelete, $preferences.fullDelete.enable)
|
||||
// featureSection(.fullDelete, $preferences.fullDelete.enable)
|
||||
featureSection(.voice, $preferences.voice.enable)
|
||||
|
||||
if groupInfo.canEdit {
|
||||
|
|
|
@ -18,7 +18,7 @@ struct PreferencesView: View {
|
|||
var body: some View {
|
||||
VStack {
|
||||
List {
|
||||
featureSection(.fullDelete, $preferences.fullDelete.allow)
|
||||
// featureSection(.fullDelete, $preferences.fullDelete.allow)
|
||||
featureSection(.voice, $preferences.voice.allow)
|
||||
|
||||
Section {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue