Skip to content

Commit c56f58a

Browse files
author
OpenCode Bot
committed
fix: revert OpenClawTheme to original signature
1 parent 110c69a commit c56f58a

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

openclaw-android/src/main/java/ai/openclaw/app/ui/OpenClawTheme.kt

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,15 @@ import androidx.compose.material3.lightColorScheme
1111
import androidx.compose.runtime.Composable
1212
import androidx.compose.runtime.CompositionLocalProvider
1313
import androidx.compose.runtime.SideEffect
14-
import androidx.compose.runtime.collectAsState
15-
import androidx.compose.runtime.getValue
1614
import androidx.compose.ui.graphics.Color
1715
import androidx.compose.ui.platform.LocalContext
1816
import androidx.compose.ui.platform.LocalView
1917
import androidx.core.view.WindowCompat
20-
import ai.openclaw.app.NodeApp
2118

2219
@Composable
23-
fun OpenClawTheme(
24-
content: @Composable () -> Unit,
25-
forceDarkMode: Boolean? = null,
26-
) {
20+
fun OpenClawTheme(content: @Composable () -> Unit) {
2721
val context = LocalContext.current
28-
val isDark = forceDarkMode ?: run {
29-
val app = context.applicationContext as? NodeApp
30-
val darkModePref = app?.prefs?.darkMode?.collectAsState()?.value
31-
darkModePref ?: isSystemInDarkTheme()
32-
}
33-
22+
val isDark = isSystemInDarkTheme()
3423
val colorScheme = when {
3524
Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
3625
if (isDark) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)

0 commit comments

Comments
 (0)