Feed: [Fix] Not trying to add Feed if not select anything on dialog box
Fix warning with RadioSelector declaration
This commit is contained in:
parent
27a1c3aa76
commit
46e7e1fbca
1 changed files with 3 additions and 3 deletions
|
|
@ -208,7 +208,7 @@ fun FeedAddSearchDialog(
|
|||
},
|
||||
onDismissRequest = onDismiss,
|
||||
confirmButton = {
|
||||
TextButton(onClick = { onClickAdd(source, selected?.let { savedSearches[it] }) }) {
|
||||
TextButton(onClick = { onClickAdd(source, selected?.let { savedSearches[it] }) }, /* KMK --> */ enabled = selected != null /* KMK <-- */) {
|
||||
Text(text = stringResource(MR.strings.action_ok))
|
||||
}
|
||||
},
|
||||
|
|
@ -218,9 +218,9 @@ fun FeedAddSearchDialog(
|
|||
@Composable
|
||||
fun <T> RadioSelector(
|
||||
options: ImmutableList<T>,
|
||||
optionStrings: ImmutableList<String> = remember { options.map { it.toString() }.toImmutableList() },
|
||||
selected: Int?,
|
||||
onSelectOption: (Int) -> Unit,
|
||||
optionStrings: ImmutableList<String> = remember { options.map { it.toString() }.toImmutableList() },
|
||||
onSelectOption: (Int) -> Unit /* KMK --> */ = {} /* KMK <-- */,
|
||||
) {
|
||||
Column(Modifier.verticalScroll(rememberScrollState())) {
|
||||
optionStrings.forEachIndexed { index, option ->
|
||||
|
|
|
|||
Loading…
Reference in a new issue