mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-22 16:07: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(
|
RadioButton(
|
||||||
selected = option.selected,
|
selected = option.selected,
|
||||||
|
enabled = option.enabled,
|
||||||
onClick = option.onClick,
|
onClick = option.onClick,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.height(26.dp)
|
.height(26.dp)
|
||||||
|
@ -142,7 +142,8 @@ class ExpirationSettingsViewModel(
|
|||||||
title: GetString = GetString { ExpirationUtil.getExpirationDisplayValue(it, duration.inWholeSeconds.toInt()) },
|
title: GetString = GetString { ExpirationUtil.getExpirationDisplayValue(it, duration.inWholeSeconds.toInt()) },
|
||||||
) = OptionModel(
|
) = OptionModel(
|
||||||
title = title,
|
title = title,
|
||||||
selected = state.expiryMode?.duration == duration
|
selected = state.expiryMode?.duration == duration,
|
||||||
|
enabled = state.isSelfAdmin
|
||||||
) { setTime(duration.inWholeSeconds) }
|
) { setTime(duration.inWholeSeconds) }
|
||||||
|
|
||||||
private fun noteToSelfOption(
|
private fun noteToSelfOption(
|
||||||
@ -244,6 +245,7 @@ data class OptionModel(
|
|||||||
val title: GetString,
|
val title: GetString,
|
||||||
val subtitle: GetString? = null,
|
val subtitle: GetString? = null,
|
||||||
val selected: Boolean = false,
|
val selected: Boolean = false,
|
||||||
|
val enabled: Boolean = true,
|
||||||
val onClick: () -> Unit = {}
|
val onClick: () -> Unit = {}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user