From 97ec100e7610e183b0f2f8c589af500fa4ffe05b Mon Sep 17 00:00:00 2001 From: ganfra Date: Tue, 18 Jun 2024 10:36:19 +0200 Subject: [PATCH] ProgressDialog : rename isCancellable param to showCancelButton on the ProgressDialogContent method. --- .../libraries/designsystem/components/ProgressDialog.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ProgressDialog.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ProgressDialog.kt index b1defd99d8..af54ec83d5 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ProgressDialog.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ProgressDialog.kt @@ -67,7 +67,7 @@ fun ProgressDialog( ProgressDialogContent( modifier = modifier, text = text, - isCancellable = showCancelButton, + showCancelButton = showCancelButton, onCancelClick = onDismissRequest, progressIndicator = { when (type) { @@ -98,7 +98,7 @@ sealed interface ProgressDialogType { private fun ProgressDialogContent( modifier: Modifier = Modifier, text: String? = null, - isCancellable: Boolean = false, + showCancelButton: Boolean = false, onCancelClick: () -> Unit = {}, progressIndicator: @Composable () -> Unit = { CircularProgressIndicator( @@ -126,7 +126,7 @@ private fun ProgressDialogContent( color = MaterialTheme.colorScheme.primary, ) } - if (isCancellable) { + if (showCancelButton) { Spacer(modifier = Modifier.height(24.dp)) Box( modifier = Modifier.fillMaxWidth(), @@ -146,7 +146,7 @@ private fun ProgressDialogContent( @Composable internal fun ProgressDialogContentPreview() = ElementThemedPreview { DialogPreview { - ProgressDialogContent(text = "test dialog content", isCancellable = true) + ProgressDialogContent(text = "test dialog content", showCancelButton = true) } }