Reformat code
This commit is contained in:
@@ -30,8 +30,11 @@ fun ClickablePreference(
|
||||
subtitle: String? = null,
|
||||
onClick: () -> Unit,
|
||||
showDivider: Boolean = true
|
||||
) =
|
||||
PreferenceTemplate(height = if (subtitle != null) 72.dp else 52.dp, showDivider = showDivider) {
|
||||
) {
|
||||
PreferenceTemplate(
|
||||
height = if (subtitle != null) 72.dp else 52.dp,
|
||||
showDivider = showDivider
|
||||
) {
|
||||
Column(
|
||||
verticalArrangement = Arrangement.Center,
|
||||
modifier = Modifier
|
||||
@@ -40,14 +43,22 @@ fun ClickablePreference(
|
||||
.clickable(onClick = onClick)
|
||||
.padding(start = 16.dp, end = 16.dp),
|
||||
) {
|
||||
Text(text = label, style = MaterialTheme.typography.subtitle1, color = MaterialTheme.colors.onBackground)
|
||||
Text(
|
||||
text = label,
|
||||
style = MaterialTheme.typography.subtitle1,
|
||||
color = MaterialTheme.colors.onBackground
|
||||
)
|
||||
subtitle?.let {
|
||||
CompositionLocalProvider(
|
||||
LocalContentAlpha provides ContentAlpha.medium,
|
||||
LocalContentColor provides MaterialTheme.colors.onBackground
|
||||
) {
|
||||
Text(text = it, style = MaterialTheme.typography.body2)
|
||||
Text(
|
||||
text = it,
|
||||
style = MaterialTheme.typography.body2
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,4 @@ inline fun NavGraphBuilder.root(crossinline content: @Composable () -> Unit) {
|
||||
val LocalRoute = compositionLocalOf { "" }
|
||||
|
||||
@Composable
|
||||
fun subRoute(name: String): String {
|
||||
return "${LocalRoute.current}/$name"
|
||||
}
|
||||
fun subRoute(name: String) = "${LocalRoute.current}/$name"
|
||||
|
||||
Reference in New Issue
Block a user