Skip to content

Commit

Permalink
ktlint
Browse files Browse the repository at this point in the history
  • Loading branch information
rozPierog committed Apr 19, 2024
1 parent ea2502e commit 5572f00
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 22 deletions.
1 change: 0 additions & 1 deletion app/src/main/java/com/omelan/cofi/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ class MainActivity : MonetCompatActivity() {
}
}


// override fun onNewIntent(newIntent: Intent?) {
// super.onNewIntent(intent)
// if (newIntent != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@ fun RecipeListInfoBoxPreview() {
text = { Text(text = stringResource(id = com.omelan.cofi.R.string.infoBox_wearOS_body)) },
onClick = {
},
onDismiss = { },
onDismiss = { },
)
}
6 changes: 4 additions & 2 deletions app/src/main/java/com/omelan/cofi/components/Timer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,10 @@ fun Timer(
fun TimerPreview() {
val animatedProgressValue = remember { Animatable(0f) }
LaunchedEffect(key1 = true) {
animatedProgressValue.animateTo(1f,
tween(durationMillis = 5 * 1000, easing = LinearEasing),)
animatedProgressValue.animateTo(
1f,
tween(durationMillis = 5 * 1000, easing = LinearEasing),
)
}
Timer(
currentStep = Step(
Expand Down
18 changes: 9 additions & 9 deletions app/src/main/java/com/omelan/cofi/pages/settings/About.kt
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ fun AppSettingsAbout(goBack: () -> Unit, openLicenses: () -> Unit) {
headlineContent = {
Text(text = stringResource(id = R.string.settings_licenses_item))
},
leadingContent = {
leadingContent = {
Icon(painterResource(id = R.drawable.ic_gavel), contentDescription = null)
},
modifier = Modifier.settingsItemModifier(onClick = openLicenses),
)
}
item {
ListItem(
overlineContent = {
overlineContent = {
Text(
text = stringResource(id = R.string.hoffmann_credits_title),
maxLines = 1,
Expand All @@ -110,7 +110,7 @@ fun AppSettingsAbout(goBack: () -> Unit, openLicenses: () -> Unit) {
fontWeight = FontWeight.Light,
)
},
leadingContent = {
leadingContent = {
Icon(painterResource(id = R.drawable.ic_coffee), contentDescription = null)
},
modifier = Modifier.settingsItemModifier(
Expand All @@ -124,7 +124,7 @@ fun AppSettingsAbout(goBack: () -> Unit, openLicenses: () -> Unit) {
}
item {
ListItem(
overlineContent = {
overlineContent = {
Text(
text = stringResource(id = R.string.tereszkiewicz_credits_title),
maxLines = 1,
Expand All @@ -139,7 +139,7 @@ fun AppSettingsAbout(goBack: () -> Unit, openLicenses: () -> Unit) {
fontWeight = FontWeight.Light,
)
},
leadingContent = {
leadingContent = {
Icon(
painterResource(id = R.drawable.recipe_icon_coffee_grinder),
contentDescription = null,
Expand All @@ -163,7 +163,7 @@ fun AppSettingsAbout(goBack: () -> Unit, openLicenses: () -> Unit) {
overflow = TextOverflow.Ellipsis,
)
},
leadingContent = {
leadingContent = {
Icon(
Icons.Rounded.Face,
contentDescription = null,
Expand All @@ -183,7 +183,7 @@ fun AppSettingsAbout(goBack: () -> Unit, openLicenses: () -> Unit) {
overflow = TextOverflow.Ellipsis,
)
},
leadingContent = {
leadingContent = {
Icon(
painterResource(id = R.drawable.ic_translate),
contentDescription = null,
Expand All @@ -198,7 +198,7 @@ fun AppSettingsAbout(goBack: () -> Unit, openLicenses: () -> Unit) {
}
item {
ListItem(
overlineContent = {
overlineContent = {
Text(
text = stringResource(R.string.app_version),
maxLines = 1,
Expand All @@ -213,7 +213,7 @@ fun AppSettingsAbout(goBack: () -> Unit, openLicenses: () -> Unit) {
fontWeight = FontWeight.Light,
)
},
leadingContent = { Icon(Icons.Rounded.Build, contentDescription = null) },
leadingContent = { Icon(Icons.Rounded.Build, contentDescription = null) },
modifier = Modifier.settingsItemModifier(
onClick = {
uriHandler.openUri(
Expand Down
20 changes: 15 additions & 5 deletions app/src/main/java/com/omelan/cofi/pages/settings/AppSettings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ fun AppSettings(
) {
item {
ListItem(
headlineContent = { Text(text = stringResource(id = R.string.settings_timer_item)) },
headlineContent = {
Text(text = stringResource(id = R.string.settings_timer_item))
},
leadingContent = {
Icon(
painterResource(id = R.drawable.ic_timer),
Expand All @@ -90,7 +92,9 @@ fun AppSettings(
}
item {
ListItem(
headlineContent = { Text(text = stringResource(id = R.string.settings_backup_item)) },
headlineContent = {
Text(text = stringResource(id = R.string.settings_backup_item))
},
leadingContent = {
Icon(
painterResource(id = R.drawable.ic_save),
Expand All @@ -102,15 +106,19 @@ fun AppSettings(
}
item {
ListItem(
headlineContent = { Text(text = stringResource(id = R.string.settings_about_item)) },
headlineContent = {
Text(text = stringResource(id = R.string.settings_about_item))
},
leadingContent = { Icon(Icons.Rounded.Info, contentDescription = null) },
modifier = Modifier.settingsItemModifier(onClick = goToAbout),
)
}
if (wearNodesWithoutApp.isNotEmpty()) {
item {
ListItem(
headlineContent = { Text(text = stringResource(id = R.string.settings_wearOS_item)) },
headlineContent = {
Text(text = stringResource(id = R.string.settings_wearOS_item))
},
leadingContent = {
Icon(
painterResource(id = R.drawable.ic_watch),
Expand All @@ -131,7 +139,9 @@ fun AppSettings(
}
item {
ListItem(
headlineContent = { Text(text = stringResource(id = R.string.settings_bug_item)) },
headlineContent = {
Text(text = stringResource(id = R.string.settings_bug_item))
},
leadingContent = {
Icon(
painterResource(id = R.drawable.ic_bug_report),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ fun BackupRestoreSettings(goBack: () -> Unit, goToRoot: () -> Unit) {
) {
item {
ListItem(
headlineContent = { Text(text = stringResource(id = R.string.settings_addDefault)) },
headlineContent = {
Text(text = stringResource(id = R.string.settings_addDefault))
},
leadingContent = { Icon(Icons.Rounded.AddCircle, contentDescription = null) },
modifier = Modifier.settingsItemModifier(
onClick = { showDefaultRecipeDialog = true },
Expand All @@ -109,7 +111,9 @@ fun BackupRestoreSettings(goBack: () -> Unit, goToRoot: () -> Unit) {
}
item {
ListItem(
headlineContent = { Text(text = stringResource(id = R.string.settings_backup)) },
headlineContent = {
Text(text = stringResource(id = R.string.settings_backup))
},
leadingContent = {
Icon(
painterResource(id = R.drawable.ic_save),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,12 @@ fun TimerSettings(goBack: () -> Unit) {
}
item {
ListItem(
headlineContent = { Text(text = stringResource(R.string.settings_background_timer_item)) },
leadingContent = { Icon(Icons.Rounded.Notifications, contentDescription = null) },
headlineContent = {
Text(text = stringResource(R.string.settings_background_timer_item))
},
leadingContent = {
Icon(Icons.Rounded.Notifications, contentDescription = null)
},
modifier = Modifier.settingsItemModifier(onClick = toggleBackgroundTimer),
trailingContent = {
Switch(
Expand Down

0 comments on commit 5572f00

Please sign in to comment.