Skip to content

Commit c8ef93b

Browse files
author
code3-dev
committed
new
1 parent 6939b21 commit c8ef93b

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ android {
1818
// Android 8.x and below are not supported due to Jetpack Compose limitations
1919
minSdk = 26
2020
targetSdk = 36
21-
versionCode = 14
22-
versionName = "1.1.3"
21+
versionCode = 15
22+
versionName = "1.1.4"
2323

2424
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2525
}

app/src/main/java/com/pira/ccloud/navigation/AppNavigation.kt

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.pira.ccloud.navigation
22

3+
import androidx.compose.foundation.isSystemInDarkTheme
34
import androidx.compose.runtime.Composable
45
import androidx.compose.runtime.remember
56
import androidx.lifecycle.viewmodel.compose.viewModel
@@ -47,6 +48,7 @@ fun AppNavigation(
4748
startDestination = AppScreens.Splash.route
4849
) {
4950
composable(route = AppScreens.Splash.route) {
51+
val isSystemInDarkMode = isSystemInDarkTheme()
5052
SplashScreen(
5153
onTimeout = {
5254
navController.popBackStack()
@@ -55,10 +57,20 @@ fun AppNavigation(
5557
launchSingleTop = true
5658
}
5759
},
58-
backgroundColor = if (themeSettings.themeMode == com.pira.ccloud.ui.theme.ThemeMode.DARK) {
59-
androidx.compose.ui.graphics.Color(0xFF121212)
60-
} else {
61-
androidx.compose.ui.graphics.Color(0xFFFFFBFE)
60+
backgroundColor = when (themeSettings.themeMode) {
61+
com.pira.ccloud.ui.theme.ThemeMode.DARK -> {
62+
androidx.compose.ui.graphics.Color(0xFF121212)
63+
}
64+
com.pira.ccloud.ui.theme.ThemeMode.LIGHT -> {
65+
androidx.compose.ui.graphics.Color(0xFFFFFBFE)
66+
}
67+
com.pira.ccloud.ui.theme.ThemeMode.SYSTEM -> {
68+
if (isSystemInDarkMode) {
69+
androidx.compose.ui.graphics.Color(0xFF121212)
70+
} else {
71+
androidx.compose.ui.graphics.Color(0xFFFFFBFE)
72+
}
73+
}
6274
}
6375
)
6476
}

app/src/main/java/com/pira/ccloud/screens/SplashScreen.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ fun SplashScreen(
6767
Column(
6868
modifier = Modifier
6969
.fillMaxSize()
70-
.background(backgroundColor)
71-
.alpha(alpha.value),
70+
.background(backgroundColor),
7271
horizontalAlignment = Alignment.CenterHorizontally,
7372
verticalArrangement = Arrangement.Center
7473
) {

0 commit comments

Comments
 (0)