@@ -10,7 +10,9 @@ import androidx.compose.runtime.mutableStateOf
1010import androidx.compose.runtime.saveable.rememberSaveable
1111import androidx.compose.runtime.setValue
1212import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
13+ import com.yapp.ndgl.core.ui.designsystem.UserGuideModal
1314import com.yapp.ndgl.core.ui.theme.NDGLTheme
15+ import com.yapp.ndgl.core.ui.util.launchBrowser
1416import com.yapp.ndgl.feature.splash.SplashRoute
1517import com.yapp.ndgl.navigation.AppScreen
1618import com.yapp.ndgl.ui.NDGLApp
@@ -25,14 +27,18 @@ class MainActivity : ComponentActivity() {
2527 setContent {
2628 NDGLTheme {
2729 var currentScreen by rememberSaveable { mutableStateOf(AppScreen .Splash ) }
30+ var showUserGuideModal by rememberSaveable { mutableStateOf(false ) }
2831
2932 AnimatedContent (
3033 targetState = currentScreen,
3134 ) { screen ->
3235 when (screen) {
3336 AppScreen .Splash -> {
3437 SplashRoute (
35- navigateToHome = { currentScreen = AppScreen .Main },
38+ navigateToHome = { isFirstUser ->
39+ showUserGuideModal = isFirstUser
40+ currentScreen = AppScreen .Main
41+ },
3642 )
3743 }
3844
@@ -41,6 +47,17 @@ class MainActivity : ComponentActivity() {
4147 }
4248 }
4349 }
50+
51+ if (showUserGuideModal) {
52+ UserGuideModal (
53+ onConfirmClick = {
54+ showUserGuideModal = false
55+ },
56+ onTermsClick = {
57+ launchBrowser(BuildConfig .NDGL_TERMS_URL )
58+ },
59+ )
60+ }
4461 }
4562 }
4663 }
0 commit comments