splash screen now reroutes to sign up screen

This commit is contained in:
lbarraga 2023-04-08 22:09:27 +02:00
parent b05e167725
commit b3329e5bdf

View file

@ -1,8 +1,10 @@
package be.ugent.sel.studeez.screens.splash
import androidx.compose.runtime.mutableStateOf
import be.ugent.sel.studeez.StudeezApp
import be.ugent.sel.studeez.domain.AccountDAO
import be.ugent.sel.studeez.domain.LogService
import be.ugent.sel.studeez.navigation.StudeezDestinations
import be.ugent.sel.studeez.screens.StudeezViewModel
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject
@ -18,9 +20,10 @@ class SplashViewModel @Inject constructor(
showError.value = false
if (accountDAO.hasUser) {
// openAndPopUp( <homeScreen>, SPLASH_SCREEN)
// TODO should go to home screen
openAndPopUp( StudeezDestinations.SIGN_UP_SCREEN, StudeezDestinations.SPLASH_SCREEN)
} else{
// openAndPopUp(<login>, SPLASH_SCREEN)
openAndPopUp(StudeezDestinations.SIGN_UP_SCREEN, StudeezDestinations.SPLASH_SCREEN)
}
}
}