Skip to content

Commit ebbd174

Browse files
committed
[BOOK-37] chore: resolve detekt warnings
1 parent a39924f commit ebbd174

File tree

7 files changed

+40
-42
lines changed

7 files changed

+40
-42
lines changed

app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ android {
1212
isMinifyEnabled = false
1313
proguardFiles(
1414
getDefaultProguardFile("proguard-android-optimize.txt"),
15-
"proguard-rules.pro"
15+
"proguard-rules.pro",
1616
)
1717
}
1818
}

app/src/androidTest/java/com/ninecraft/booket/ExampleInstrumentedTest.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
package com.ninecraft.booket
22

3-
import androidx.test.platform.app.InstrumentationRegistry
43
import androidx.test.ext.junit.runners.AndroidJUnit4
5-
4+
import androidx.test.platform.app.InstrumentationRegistry
5+
import org.junit.Assert.assertEquals
66
import org.junit.Test
77
import org.junit.runner.RunWith
88

9-
import org.junit.Assert.*
10-
119
/**
1210
* Instrumented test, which will execute on an Android device.
1311
*

app/src/main/java/com/ninecraft/booket/MainActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class MainActivity : ComponentActivity() {
2222
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
2323
Greeting(
2424
name = "Android",
25-
modifier = Modifier.padding(innerPadding)
25+
modifier = Modifier.padding(innerPadding),
2626
)
2727
}
2828
}
@@ -34,7 +34,7 @@ class MainActivity : ComponentActivity() {
3434
fun Greeting(name: String, modifier: Modifier = Modifier) {
3535
Text(
3636
text = "Hello $name!",
37-
modifier = modifier
37+
modifier = modifier,
3838
)
3939
}
4040

app/src/main/java/com/ninecraft/booket/ui/theme/Color.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ val Pink80 = Color(0xFFEFB8C8)
88

99
val Purple40 = Color(0xFF6650a4)
1010
val PurpleGrey40 = Color(0xFF625b71)
11-
val Pink40 = Color(0xFF7D5260)
11+
val Pink40 = Color(0xFF7D5260)
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.ninecraft.booket.ui.theme
22

3-
import android.app.Activity
43
import android.os.Build
54
import androidx.compose.foundation.isSystemInDarkTheme
65
import androidx.compose.material3.MaterialTheme
@@ -14,31 +13,32 @@ import androidx.compose.ui.platform.LocalContext
1413
private val DarkColorScheme = darkColorScheme(
1514
primary = Purple80,
1615
secondary = PurpleGrey80,
17-
tertiary = Pink80
16+
tertiary = Pink80,
1817
)
1918

2019
private val LightColorScheme = lightColorScheme(
2120
primary = Purple40,
2221
secondary = PurpleGrey40,
23-
tertiary = Pink40
22+
tertiary = Pink40,
2423

25-
/* Other default colors to override
26-
background = Color(0xFFFFFBFE),
27-
surface = Color(0xFFFFFBFE),
28-
onPrimary = Color.White,
29-
onSecondary = Color.White,
30-
onTertiary = Color.White,
31-
onBackground = Color(0xFF1C1B1F),
32-
onSurface = Color(0xFF1C1B1F),
33-
*/
24+
/*
25+
* Other default colors to override
26+
* background = Color(0xFFFFFBFE),
27+
* surface = Color(0xFFFFFBFE),
28+
* onPrimary = Color.White,
29+
* onSecondary = Color.White,
30+
* onTertiary = Color.White,
31+
* onBackground = Color(0xFF1C1B1F),
32+
* onSurface = Color(0xFF1C1B1F),
33+
*/
3434
)
3535

3636
@Composable
3737
fun BooketAndroidTheme(
3838
darkTheme: Boolean = isSystemInDarkTheme(),
3939
// Dynamic color is available on Android 12+
4040
dynamicColor: Boolean = true,
41-
content: @Composable () -> Unit
41+
content: @Composable () -> Unit,
4242
) {
4343
val colorScheme = when {
4444
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
@@ -53,6 +53,6 @@ fun BooketAndroidTheme(
5353
MaterialTheme(
5454
colorScheme = colorScheme,
5555
typography = Typography,
56-
content = content
56+
content = content,
5757
)
5858
}

app/src/main/java/com/ninecraft/booket/ui/theme/Type.kt

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,23 @@ val Typography = Typography(
1313
fontWeight = FontWeight.Normal,
1414
fontSize = 16.sp,
1515
lineHeight = 24.sp,
16-
letterSpacing = 0.5.sp
17-
)
18-
/* Other default text styles to override
19-
titleLarge = TextStyle(
20-
fontFamily = FontFamily.Default,
21-
fontWeight = FontWeight.Normal,
22-
fontSize = 22.sp,
23-
lineHeight = 28.sp,
24-
letterSpacing = 0.sp
16+
letterSpacing = 0.5.sp,
2517
),
26-
labelSmall = TextStyle(
27-
fontFamily = FontFamily.Default,
28-
fontWeight = FontWeight.Medium,
29-
fontSize = 11.sp,
30-
lineHeight = 16.sp,
31-
letterSpacing = 0.5.sp
32-
)
33-
*/
34-
)
18+
/*
19+
* Other default text styles to override
20+
* titleLarge = TextStyle(
21+
* fontFamily = FontFamily.Default,
22+
* fontWeight = FontWeight.Normal,
23+
* fontSize = 22.sp,
24+
* lineHeight = 28.sp,
25+
* letterSpacing = 0.sp,
26+
* ),
27+
* labelSmall = TextStyle(
28+
* fontFamily = FontFamily.Default,
29+
* fontWeight = FontWeight.Medium,
30+
* fontSize = 11.sp,
31+
* lineHeight = 16.sp,
32+
* letterSpacing = 0.5.sp,
33+
* )
34+
*/
35+
)

app/src/test/java/com/ninecraft/booket/ExampleUnitTest.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package com.ninecraft.booket
22

3+
import org.junit.Assert.assertEquals
34
import org.junit.Test
45

5-
import org.junit.Assert.*
6-
76
/**
87
* Example local unit test, which will execute on the development machine (host).
98
*

0 commit comments

Comments
 (0)