Reformat code

This commit is contained in:
Patryk Michalik
2021-06-26 15:38:50 +02:00
parent c5d802d70f
commit 4d160f7baa
2 changed files with 17 additions and 8 deletions
@@ -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"