Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Switch to LaunchedEffect instead of SideEffect
Browse files Browse the repository at this point in the history
Signed-off-by: Aayush Gupta <[email protected]>
  • Loading branch information
theimpulson committed Aug 19, 2023
1 parent 2527064 commit a50c1fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/io/aayush/relabs/ui/theme/Theme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import androidx.compose.material3.dynamicDarkColorScheme
import androidx.compose.material3.dynamicLightColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.SideEffect
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.platform.LocalContext
import com.google.accompanist.systemuicontroller.rememberSystemUiController

Expand All @@ -31,7 +31,7 @@ fun ReLabsTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable
}

val systemUiController = rememberSystemUiController()
SideEffect {
LaunchedEffect(key1 = Unit) {
systemUiController.setSystemBarsColor(colors.background, darkIcons = !darkTheme)
}

Expand Down

0 comments on commit a50c1fb

Please sign in to comment.