Skip to content

Commit 6546c3b

Browse files
committed
style: apply spotless
1 parent 28d535c commit 6546c3b

File tree

12 files changed

+45
-44
lines changed

12 files changed

+45
-44
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import android.os.Build
22

33
class AndroidPlatform : Platform {
4-
override val name: String = "Android ${Build.VERSION.SDK_INT}"
4+
override val name: String = "Android ${Build.VERSION.SDK_INT}"
55
}
66

77
actual fun getPlatform(): Platform = AndroidPlatform()

examples/src/androidMain/kotlin/org/jetbrains/storytale/example/MainActivity.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ import androidx.compose.runtime.Composable
88
import androidx.compose.ui.tooling.preview.Preview
99

1010
class MainActivity : ComponentActivity() {
11-
override fun onCreate(savedInstanceState: Bundle?) {
12-
super.onCreate(savedInstanceState)
11+
override fun onCreate(savedInstanceState: Bundle?) {
12+
super.onCreate(savedInstanceState)
1313

14-
setContent {
15-
App()
14+
setContent {
15+
App()
16+
}
1617
}
17-
}
1818
}
1919

2020
@Preview
2121
@Composable
2222
private fun AppAndroidPreview() {
23-
App()
23+
App()
2424
}

examples/src/commonMain/kotlin/App.kt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ import androidx.compose.ui.unit.dp
1616

1717
@Composable
1818
fun App(modifier: Modifier = Modifier) {
19-
var showContent by remember { mutableStateOf(false) }
19+
var showContent by remember { mutableStateOf(false) }
2020

21-
MaterialTheme {
22-
Column(
23-
modifier = modifier.fillMaxWidth(),
24-
horizontalAlignment = Alignment.CenterHorizontally,
25-
) {
26-
PrimaryButton(text = "Click Me", onClick = { showContent = !showContent })
27-
AnimatedVisibility(showContent) {
28-
val greeting = remember { Greeting().greet() }
29-
Column(Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally) {
30-
ComposeLogo(Modifier.size(600.dp))
31-
Text("Compose: $greeting")
21+
MaterialTheme {
22+
Column(
23+
modifier = modifier.fillMaxWidth(),
24+
horizontalAlignment = Alignment.CenterHorizontally,
25+
) {
26+
PrimaryButton(text = "Click Me", onClick = { showContent = !showContent })
27+
AnimatedVisibility(showContent) {
28+
val greeting = remember { Greeting().greet() }
29+
Column(Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally) {
30+
ComposeLogo(Modifier.size(600.dp))
31+
Text("Compose: $greeting")
32+
}
33+
}
3234
}
33-
}
3435
}
35-
}
3636
}

examples/src/commonMain/kotlin/ComposeLogo.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import org.jetbrains.compose.storytale.example.compose_multiplatform
77

88
@Composable
99
fun ComposeLogo(
10-
modifier: Modifier = Modifier,
10+
modifier: Modifier = Modifier,
1111
) {
12-
Image(
13-
painter = painterResource(Res.drawable.compose_multiplatform),
14-
contentDescription = "Compose Multiplatform Logo",
15-
modifier = modifier,
16-
)
12+
Image(
13+
painter = painterResource(Res.drawable.compose_multiplatform),
14+
contentDescription = "Compose Multiplatform Logo",
15+
modifier = modifier,
16+
)
1717
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class Greeting {
2-
private val platform = getPlatform()
2+
private val platform = getPlatform()
33

4-
fun greet(): String {
5-
return "Hello, ${platform.name}!"
6-
}
4+
fun greet(): String {
5+
return "Hello, ${platform.name}!"
6+
}
77
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
interface Platform {
2-
val name: String
2+
val name: String
33
}
44

55
expect fun getPlatform(): Platform

examples/src/commonMain/kotlin/PrimaryButton.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import androidx.compose.material.Button
22
import androidx.compose.material.Text
33
import androidx.compose.runtime.Composable
44
import androidx.compose.ui.Modifier
5-
import androidx.compose.ui.unit.dp
65
import androidx.compose.ui.unit.sp
76

87
@Composable
@@ -30,5 +29,7 @@ fun PrimaryButton(
3029
}
3130

3231
enum class PrimaryButtonSize {
33-
Small, Medium, Large,
32+
Small,
33+
Medium,
34+
Large,
3435
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class JVMPlatform : Platform {
2-
override val name: String = "Java ${System.getProperty("java.version")}"
2+
override val name: String = "Java ${System.getProperty("java.version")}"
33
}
44

55
actual fun getPlatform(): Platform = JVMPlatform()

examples/src/desktopMain/kotlin/main.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import androidx.compose.ui.window.Window
22
import androidx.compose.ui.window.application
33

44
fun main() = application {
5-
Window(
6-
onCloseRequest = ::exitApplication,
7-
title = "example",
8-
) {
9-
App()
10-
}
5+
Window(
6+
onCloseRequest = ::exitApplication,
7+
title = "example",
8+
) {
9+
App()
10+
}
1111
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import platform.UIKit.UIDevice
22

33
class IOSPlatform : Platform {
4-
override val name: String = UIDevice.currentDevice.systemName() + " " + UIDevice.currentDevice.systemVersion
4+
override val name: String = UIDevice.currentDevice.systemName() + " " + UIDevice.currentDevice.systemVersion
55
}
66

77
actual fun getPlatform(): Platform = IOSPlatform()

0 commit comments

Comments
 (0)