From 648eedbca1daa2f0d99805916a25a7ad2806866a Mon Sep 17 00:00:00 2001 From: Saifuddin Date: Mon, 23 Sep 2024 22:30:20 +0530 Subject: [PATCH] Status bar updated --- .../kotlin/org/mifos/mobile/core/designsystem/theme/Theme.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/designsystem/src/main/kotlin/org/mifos/mobile/core/designsystem/theme/Theme.kt b/core/designsystem/src/main/kotlin/org/mifos/mobile/core/designsystem/theme/Theme.kt index 6ff1913f2..34f73cffb 100644 --- a/core/designsystem/src/main/kotlin/org/mifos/mobile/core/designsystem/theme/Theme.kt +++ b/core/designsystem/src/main/kotlin/org/mifos/mobile/core/designsystem/theme/Theme.kt @@ -20,6 +20,7 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.toArgb import androidx.compose.ui.platform.LocalView import androidx.core.view.WindowCompat +import androidx.core.view.WindowInsetsControllerCompat private val LightThemeColors = lightColorScheme( primary = LightPrimary, @@ -59,8 +60,8 @@ fun MifosMobileTheme( if (!view.isInEditMode) { SideEffect { val window = (view.context as Activity).window - window.statusBarColor = colors.primary.toArgb() - WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !useDarkTheme + WindowCompat.setDecorFitsSystemWindows(window, false) + WindowInsetsControllerCompat(window, window.decorView).isAppearanceLightStatusBars = true } }