chore: make `LaunchedEffect` keys consistent

This commit is contained in:
Harsh Shandilya 2024-05-07 13:09:30 +05:30
parent 847858d852
commit 9fe6e34015
2 changed files with 2 additions and 2 deletions

View File

@ -119,7 +119,7 @@ fun LobstersPostsScreen(
val navigationType = ClawNavigationType.fromSize(windowSizeClass.widthSizeClass)
val postIdOverride = context.getActivity()?.intent?.extras?.getString(MainActivity.NAVIGATION_KEY)
LaunchedEffect(false) {
LaunchedEffect(Unit) {
if (postIdOverride != null) {
navController.navigate(Comments(postIdOverride))
}

View File

@ -30,7 +30,7 @@ import io.github.aakira.napier.Napier
@Composable
fun NetworkError(label: String, error: Throwable, modifier: Modifier = Modifier) {
LaunchedEffect(true) { Napier.e(error, "NetworkError") { "Failed to load posts" } }
LaunchedEffect(Unit) { Napier.e(error, "NetworkError") { "Failed to load posts" } }
var showDialog by remember { mutableStateOf(false) }
Column(verticalArrangement = Arrangement.spacedBy(4.dp), modifier = modifier) {
Text(