Skip to content

Commit cef9e5d

Browse files
committed
Fix formatting
1 parent 758c800 commit cef9e5d

File tree

6 files changed

+37
-23
lines changed

6 files changed

+37
-23
lines changed

app/src/main/java/net/opatry/speedrun/emea/data/MySootheCollections.kt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,14 @@ val mySootheCollections = listOf(
3636
)
3737

3838
val mySootheBodyActivities = listOf(
39-
MySootheActivity.BodyActivity(R.string.inversions, R.drawable.pexels_chevanon_photography_317157),
40-
MySootheActivity.BodyActivity(R.string.quick_yoga, R.drawable.pexels_agung_pandit_wiguna_1812964),
39+
MySootheActivity.BodyActivity(
40+
R.string.inversions,
41+
R.drawable.pexels_chevanon_photography_317157
42+
),
43+
MySootheActivity.BodyActivity(
44+
R.string.quick_yoga,
45+
R.drawable.pexels_agung_pandit_wiguna_1812964
46+
),
4147
MySootheActivity.BodyActivity(R.string.stretching, R.drawable.pexels_cliff_booth_4056723),
4248
MySootheActivity.BodyActivity(R.string.tabata, R.drawable.pexels_elly_fairytale_4662438),
4349
MySootheActivity.BodyActivity(R.string.hiit, R.drawable.pexels_the_lazy_artist_gallery_999309),
@@ -47,7 +53,10 @@ val mySootheBodyActivities = listOf(
4753
val mySootheMindActivities = listOf(
4854
MySootheActivity.MindActivity(R.string.meditate, R.drawable.pexels_elly_fairytale_3822622),
4955
MySootheActivity.MindActivity(R.string.with_kids, R.drawable.pexels_valeria_ushakova_3094230),
50-
MySootheActivity.MindActivity(R.string.aromatherapy, R.drawable.pexels_karolina_grabowska_4498318),
56+
MySootheActivity.MindActivity(
57+
R.string.aromatherapy,
58+
R.drawable.pexels_karolina_grabowska_4498318
59+
),
5160
MySootheActivity.MindActivity(R.string.on_the_go, R.drawable.pexels_suraphat_nueaon_1241348),
5261
MySootheActivity.MindActivity(R.string.with_pets, R.drawable.pexels_cottonbro_4056535),
5362
MySootheActivity.MindActivity(R.string.high_stress, R.drawable.pexels_nathan_cowley_897817),

app/src/main/java/net/opatry/speedrun/emea/model/MySootheModel.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ import androidx.annotation.StringRes
2828
data class MySootheCollection(@StringRes val name: Int, @DrawableRes val picture: Int)
2929

3030
sealed class MySootheActivity(@StringRes val name: Int, @DrawableRes val picture: Int) {
31-
class BodyActivity(@StringRes name: Int, @DrawableRes picture: Int) : MySootheActivity(name, picture)
32-
class MindActivity(@StringRes name: Int, @DrawableRes picture: Int) : MySootheActivity(name, picture)
31+
class BodyActivity(@StringRes name: Int, @DrawableRes picture: Int) :
32+
MySootheActivity(name, picture)
33+
34+
class MindActivity(@StringRes name: Int, @DrawableRes picture: Int) :
35+
MySootheActivity(name, picture)
3336
}

app/src/main/java/net/opatry/speedrun/emea/ui/home/HomeScreen.kt

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,13 @@ fun HomeScreen() {
102102
) {
103103
tabs.forEach { navItem ->
104104
BottomNavigationItem(
105-
icon = { Icon(
106-
navItem.icon,
107-
null,
108-
Modifier.size(18.dp) //.navigationBarsPadding()
109-
) },
105+
icon = {
106+
Icon(
107+
navItem.icon,
108+
null,
109+
Modifier.size(18.dp) //.navigationBarsPadding()
110+
)
111+
},
110112
label = { Text(stringResource(navItem.titleRes).toUpperCase()) },
111113
selected = selectedTab == navItem,
112114
selectedContentColor = MaterialTheme.colors.onBackground,
@@ -118,13 +120,7 @@ fun HomeScreen() {
118120
}
119121
}
120122
) { contentPadding ->
121-
Column(
122-
Modifier
123-
.verticalScroll(rememberScrollState())
124-
// FIXME should be managed by status bar transparent management
125-
//.padding(contentPadding)
126-
//.padding(horizontal = 16.dp, vertical = 36.dp)
127-
) {
123+
Column(Modifier.verticalScroll(rememberScrollState())) {
128124
SearchComponent(Modifier.padding(top = 56.dp, start = 16.dp, end = 16.dp))
129125
FavoriteCollections(
130126
mySootheCollections,

app/src/main/java/net/opatry/speedrun/emea/ui/home/component/ActivityComponent.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,17 @@ fun ActivityComponent(name: String, picture: Painter) {
8989
role = Role.Button,
9090
interactionSource = remember { MutableInteractionSource() },
9191
indication = rememberRipple(bounded = false)
92-
) { },
93-
horizontalAlignment = Alignment.CenterHorizontally) {
92+
) { },
93+
horizontalAlignment = Alignment.CenterHorizontally
94+
) {
9495
Image(
9596
picture,
9697
null,
9798
Modifier
9899
.width(88.dp)
99100
.aspectRatio(1f)
100101
.clip(CircleShape),
101-
contentScale = ContentScale.FillBounds
102+
contentScale = ContentScale.FillBounds
102103
)
103104
Text(
104105
name,

app/src/main/java/net/opatry/speedrun/emea/ui/home/component/FavoriteCollectionComponent.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,17 @@ fun FavoriteCollections(collections: List<MySootheCollection>, modifier: Modifie
7777
CollectionCard(
7878
stringResource(first.name),
7979
painterResource(first.picture),
80-
Modifier.width(192.dp).height(56.dp)
80+
Modifier
81+
.width(192.dp)
82+
.height(56.dp)
8183
)
8284
Spacer(Modifier.height(8.dp))
8385
CollectionCard(
8486
stringResource(second.name),
8587
painterResource(second.picture),
86-
Modifier.width(192.dp).height(56.dp)
88+
Modifier
89+
.width(192.dp)
90+
.height(56.dp)
8791
)
8892
}
8993
Spacer(Modifier.width(8.dp))

app/src/main/java/net/opatry/speedrun/emea/ui/theme/Color.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ val White800 = Color.White.copy(alpha = .8f)
3737
val White850 = Color.White.copy(alpha = .85f)
3838

3939
@Composable
40-
fun mySootheTextFieldDefaults() = TextFieldDefaults.textFieldColors(backgroundColor = MaterialTheme.colors.surface)
40+
fun mySootheTextFieldDefaults() =
41+
TextFieldDefaults.textFieldColors(backgroundColor = MaterialTheme.colors.surface)

0 commit comments

Comments
 (0)