mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-22 07:57:30 +00:00
Add disabled group options
This commit is contained in:
parent
9f6dd728d5
commit
bfd2370730
@ -285,6 +285,7 @@ fun TitledRadioButton(option: OptionModel) {
|
||||
}
|
||||
RadioButton(
|
||||
selected = option.selected,
|
||||
enabled = option.enabled,
|
||||
onClick = option.onClick,
|
||||
modifier = Modifier
|
||||
.height(26.dp)
|
||||
|
@ -142,7 +142,8 @@ class ExpirationSettingsViewModel(
|
||||
title: GetString = GetString { ExpirationUtil.getExpirationDisplayValue(it, duration.inWholeSeconds.toInt()) },
|
||||
) = OptionModel(
|
||||
title = title,
|
||||
selected = state.expiryMode?.duration == duration
|
||||
selected = state.expiryMode?.duration == duration,
|
||||
enabled = state.isSelfAdmin
|
||||
) { setTime(duration.inWholeSeconds) }
|
||||
|
||||
private fun noteToSelfOption(
|
||||
@ -244,6 +245,7 @@ data class OptionModel(
|
||||
val title: GetString,
|
||||
val subtitle: GetString? = null,
|
||||
val selected: Boolean = false,
|
||||
val enabled: Boolean = true,
|
||||
val onClick: () -> Unit = {}
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user