ProgressDialog : rename isCancellable param to showCancelButton on the ProgressDialogContent method.
This commit is contained in:
parent
56251f805c
commit
873eeadb65
1 changed files with 4 additions and 4 deletions
|
|
@ -67,7 +67,7 @@ fun ProgressDialog(
|
||||||
ProgressDialogContent(
|
ProgressDialogContent(
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
text = text,
|
text = text,
|
||||||
isCancellable = showCancelButton,
|
showCancelButton = showCancelButton,
|
||||||
onCancelClick = onDismissRequest,
|
onCancelClick = onDismissRequest,
|
||||||
progressIndicator = {
|
progressIndicator = {
|
||||||
when (type) {
|
when (type) {
|
||||||
|
|
@ -98,7 +98,7 @@ sealed interface ProgressDialogType {
|
||||||
private fun ProgressDialogContent(
|
private fun ProgressDialogContent(
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
isCancellable: Boolean = false,
|
showCancelButton: Boolean = false,
|
||||||
onCancelClick: () -> Unit = {},
|
onCancelClick: () -> Unit = {},
|
||||||
progressIndicator: @Composable () -> Unit = {
|
progressIndicator: @Composable () -> Unit = {
|
||||||
CircularProgressIndicator(
|
CircularProgressIndicator(
|
||||||
|
|
@ -126,7 +126,7 @@ private fun ProgressDialogContent(
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = MaterialTheme.colorScheme.primary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (isCancellable) {
|
if (showCancelButton) {
|
||||||
Spacer(modifier = Modifier.height(24.dp))
|
Spacer(modifier = Modifier.height(24.dp))
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
|
|
@ -146,7 +146,7 @@ private fun ProgressDialogContent(
|
||||||
@Composable
|
@Composable
|
||||||
internal fun ProgressDialogContentPreview() = ElementThemedPreview {
|
internal fun ProgressDialogContentPreview() = ElementThemedPreview {
|
||||||
DialogPreview {
|
DialogPreview {
|
||||||
ProgressDialogContent(text = "test dialog content", isCancellable = true)
|
ProgressDialogContent(text = "test dialog content", showCancelButton = true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue