Skip to content

Commit 9f7b56f

Browse files
committed
Update Theme.kt
1 parent 45fba1d commit 9f7b56f

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

  • app/src/main/java/com/example/reply/ui/theme

app/src/main/java/com/example/reply/ui/theme/Theme.kt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.example.reply.ui.theme
1818

19-
import android.app.Activity
2019
import android.os.Build
2120
import androidx.compose.foundation.isSystemInDarkTheme
2221
import androidx.compose.material3.MaterialTheme
@@ -25,11 +24,7 @@ import androidx.compose.material3.dynamicDarkColorScheme
2524
import androidx.compose.material3.dynamicLightColorScheme
2625
import androidx.compose.material3.lightColorScheme
2726
import androidx.compose.runtime.Composable
28-
import androidx.compose.runtime.SideEffect
29-
import androidx.compose.ui.graphics.toArgb
3027
import androidx.compose.ui.platform.LocalContext
31-
import androidx.compose.ui.platform.LocalView
32-
import androidx.core.view.WindowCompat
3328

3429
private val LightColorScheme = lightColorScheme(
3530
primary = md_theme_light_primary,
@@ -114,14 +109,6 @@ fun ReplyTheme(
114109
darkTheme -> DarkColorScheme
115110
else -> LightColorScheme
116111
}
117-
val view = LocalView.current
118-
if (!view.isInEditMode) {
119-
SideEffect {
120-
val window = (view.context as Activity).window
121-
window.statusBarColor = colorScheme.primary.toArgb()
122-
WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme
123-
}
124-
}
125112

126113
MaterialTheme(
127114
colorScheme = colorScheme,

0 commit comments

Comments
 (0)