mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Show groups that have the same member list during group creation.
This commit is contained in:
committed by
Cody Henthorne
parent
f09bf5b14c
commit
9de75b3e1f
@@ -9,4 +9,5 @@ sealed interface LabsSettingsEvents {
|
||||
data class ToggleIndividualChatPlaintextExport(val enabled: Boolean) : LabsSettingsEvents
|
||||
data class ToggleStoryArchive(val enabled: Boolean) : LabsSettingsEvents
|
||||
data class ToggleIncognito(val enabled: Boolean) : LabsSettingsEvents
|
||||
data class ToggleGroupSuggestionsForMembers(val enabled: Boolean) : LabsSettingsEvents
|
||||
}
|
||||
|
||||
@@ -115,6 +115,15 @@ private fun LabsSettingsContent(
|
||||
onCheckChanged = { onEvent(LabsSettingsEvents.ToggleIncognito(it)) }
|
||||
)
|
||||
}
|
||||
|
||||
item {
|
||||
Rows.ToggleRow(
|
||||
checked = state.groupSuggestionsForMembers,
|
||||
text = "Group Suggestions for Members",
|
||||
label = "When creating a group, show existing groups that have the exact same members.",
|
||||
onCheckChanged = { onEvent(LabsSettingsEvents.ToggleGroupSuggestionsForMembers(it)) }
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,5 +11,6 @@ import androidx.compose.runtime.Immutable
|
||||
data class LabsSettingsState(
|
||||
val individualChatPlaintextExport: Boolean = false,
|
||||
val storyArchive: Boolean = false,
|
||||
val incognito: Boolean = false
|
||||
val incognito: Boolean = false,
|
||||
val groupSuggestionsForMembers: Boolean = false
|
||||
)
|
||||
|
||||
@@ -29,6 +29,10 @@ class LabsSettingsViewModel : ViewModel() {
|
||||
SignalStore.labs.incognito = event.enabled
|
||||
_state.value = _state.value.copy(incognito = event.enabled)
|
||||
}
|
||||
is LabsSettingsEvents.ToggleGroupSuggestionsForMembers -> {
|
||||
SignalStore.labs.groupSuggestionsForMembers = event.enabled
|
||||
_state.value = _state.value.copy(groupSuggestionsForMembers = event.enabled)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +40,8 @@ class LabsSettingsViewModel : ViewModel() {
|
||||
return LabsSettingsState(
|
||||
individualChatPlaintextExport = SignalStore.labs.individualChatPlaintextExport,
|
||||
storyArchive = SignalStore.labs.storyArchive,
|
||||
incognito = SignalStore.labs.incognito
|
||||
incognito = SignalStore.labs.incognito,
|
||||
groupSuggestionsForMembers = SignalStore.labs.groupSuggestionsForMembers
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user