Merge pull request #1597 from vector-im/renovate/androidx.compose.material3-material3-1.x
Update dependency androidx.compose.material3:material3 to v1.2.0-alpha10
This commit is contained in:
@@ -217,7 +217,7 @@ private fun Content(
|
||||
) {
|
||||
LinearProgressIndicator(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
progress = state.backupUploadState.backedUpCount.toFloat() / state.backupUploadState.totalCount.toFloat(),
|
||||
progress = { state.backupUploadState.backedUpCount.toFloat() / state.backupUploadState.totalCount.toFloat() },
|
||||
trackColor = ElementTheme.colors.progressIndicatorTrackColor,
|
||||
)
|
||||
Text(
|
||||
|
||||
@@ -33,8 +33,8 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.StrokeCap
|
||||
import androidx.compose.ui.res.pluralStringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||
import io.element.android.libraries.designsystem.theme.components.LinearProgressIndicator
|
||||
import io.element.android.libraries.designsystem.theme.components.Text
|
||||
@@ -96,10 +96,12 @@ internal fun PollAnswerView(
|
||||
LinearProgressIndicator(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
color = if (answerItem.isWinner) ElementTheme.colors.textSuccessPrimary else answerItem.isEnabled.toEnabledColor(),
|
||||
progress = when {
|
||||
answerItem.isDisclosed -> answerItem.percentage
|
||||
answerItem.isSelected -> 1f
|
||||
else -> 0f
|
||||
progress = {
|
||||
when {
|
||||
answerItem.isDisclosed -> answerItem.percentage
|
||||
answerItem.isSelected -> 1f
|
||||
else -> 0f
|
||||
}
|
||||
},
|
||||
trackColor = ElementTheme.colors.progressIndicatorTrackColor,
|
||||
strokeCap = StrokeCap.Round,
|
||||
|
||||
@@ -99,7 +99,7 @@ androidx_preference = "androidx.preference:preference:1.2.1"
|
||||
androidx_webkit = "androidx.webkit:webkit:1.8.0"
|
||||
|
||||
androidx_compose_bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose_bom" }
|
||||
androidx_compose_material3 = "androidx.compose.material3:material3:1.2.0-alpha09"
|
||||
androidx_compose_material3 = "androidx.compose.material3:material3:1.2.0-alpha10"
|
||||
|
||||
# Coroutines
|
||||
coroutines_core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
|
||||
|
||||
@@ -75,7 +75,7 @@ fun ProgressDialog(
|
||||
}
|
||||
is ProgressDialogType.Determinate -> {
|
||||
CircularProgressIndicator(
|
||||
progress = type.progress,
|
||||
progress = { type.progress },
|
||||
color = MaterialTheme.colorScheme.primary
|
||||
)
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import io.element.android.libraries.designsystem.preview.PreviewGroup
|
||||
|
||||
@Composable
|
||||
fun CircularProgressIndicator(
|
||||
progress: Float,
|
||||
progress: () -> Float,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = ProgressIndicatorDefaults.circularColor,
|
||||
strokeWidth: Dp = ProgressIndicatorDefaults.CircularStrokeWidth
|
||||
@@ -54,7 +54,7 @@ fun CircularProgressIndicator(
|
||||
// Use a determinate progress indicator to improve the preview rendering
|
||||
androidx.compose.material3.CircularProgressIndicator(
|
||||
modifier = modifier,
|
||||
progress = 0.75F,
|
||||
progress = { 0.75F },
|
||||
color = color,
|
||||
strokeWidth = strokeWidth,
|
||||
)
|
||||
@@ -79,7 +79,7 @@ private fun ContentToPreview() {
|
||||
)
|
||||
// Fixed progress
|
||||
CircularProgressIndicator(
|
||||
progress = 0.90F
|
||||
progress = { 0.90F }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import io.element.android.libraries.designsystem.preview.PreviewGroup
|
||||
|
||||
@Composable
|
||||
fun LinearProgressIndicator(
|
||||
progress: Float,
|
||||
progress: () -> Float,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = ProgressIndicatorDefaults.linearColor,
|
||||
trackColor: Color = ProgressIndicatorDefaults.linearTrackColor,
|
||||
@@ -57,7 +57,7 @@ fun LinearProgressIndicator(
|
||||
// Use a determinate progress indicator to improve the preview rendering
|
||||
androidx.compose.material3.LinearProgressIndicator(
|
||||
modifier = modifier,
|
||||
progress = 0.75F,
|
||||
progress = { 0.75F },
|
||||
color = color,
|
||||
trackColor = trackColor,
|
||||
strokeCap = strokeCap,
|
||||
@@ -84,7 +84,7 @@ private fun ContentToPreview() {
|
||||
)
|
||||
// Fixed progress
|
||||
LinearProgressIndicator(
|
||||
progress = 0.90F
|
||||
progress = { 0.90F }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user