mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-02-18 12:50:36 +01:00
Make onCancelClick
nullable
This commit is contained in:
parent
15dcb65fbc
commit
b5b215af6e
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user