Show groups that have the same member list during group creation.

This commit is contained in:
Greyson Parrelli
2026-03-18 22:54:29 -04:00
committed by Cody Henthorne
parent f09bf5b14c
commit 9de75b3e1f
11 changed files with 140 additions and 4 deletions

View File

@@ -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
}

View File

@@ -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)) }
)
}
}
}
}

View File

@@ -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
)

View File

@@ -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
)
}
}