mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-06-05 21:59:19 +02:00
Make onCancelClick
nullable
This commit is contained in:
@ -22,7 +22,7 @@ fun SleepTimerCustomAlertDialog(
|
||||
alertDialogState: AlertDialogState,
|
||||
modifier: Modifier = Modifier,
|
||||
onConfirmClick: (seconds: Int) -> Unit,
|
||||
onCancelClick: () -> Unit = {}
|
||||
onCancelClick: (() -> Unit)? = null
|
||||
) {
|
||||
var selectedItem by remember { mutableIntStateOf(0) }
|
||||
var value by remember { mutableStateOf("") }
|
||||
@ -92,7 +92,7 @@ fun SleepTimerCustomAlertDialog(
|
||||
horizontalArrangement = Arrangement.End
|
||||
) {
|
||||
TextButton(onClick = {
|
||||
onCancelClick()
|
||||
onCancelClick?.invoke()
|
||||
alertDialogState.hide()
|
||||
}) {
|
||||
Text(text = stringResource(id = R.string.cancel))
|
||||
|
Reference in New Issue
Block a user