File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
app/src/main/java/com/uravgcode/chooser/navigation/presentation Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import androidx.compose.animation.scaleOut
2323import androidx.compose.foundation.background
2424import androidx.compose.runtime.Composable
2525import androidx.compose.runtime.getValue
26+ import androidx.compose.runtime.remember
2627import androidx.compose.runtime.rememberCoroutineScope
2728import androidx.compose.ui.Modifier
2829import androidx.compose.ui.graphics.Color
@@ -47,7 +48,8 @@ fun Navigation(
4748 val navController = rememberNavController()
4849 val coroutineScope = rememberCoroutineScope()
4950
50- val hasSeenTutorial by dataStore.data.map { it.hasSeenTutorial }.collectAsStateWithLifecycle(initialValue = true )
51+ val hasSeenTutorialFlow = remember { dataStore.data.map { it.hasSeenTutorial } }
52+ val hasSeenTutorial by hasSeenTutorialFlow.collectAsStateWithLifecycle(initialValue = true )
5153 val startDestination = if (hasSeenTutorial) Screen .Chooser else Screen .Tutorial
5254
5355 val context = LocalContext .current
@@ -90,3 +92,4 @@ fun Navigation(
9092 }
9193 }
9294}
95+
You can’t perform that action at this time.
0 commit comments