splash screen now reroutes to sign up screen
This commit is contained in:
parent
b05e167725
commit
b3329e5bdf
1 changed files with 5 additions and 2 deletions
|
@ -1,8 +1,10 @@
|
||||||
package be.ugent.sel.studeez.screens.splash
|
package be.ugent.sel.studeez.screens.splash
|
||||||
|
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
|
import be.ugent.sel.studeez.StudeezApp
|
||||||
import be.ugent.sel.studeez.domain.AccountDAO
|
import be.ugent.sel.studeez.domain.AccountDAO
|
||||||
import be.ugent.sel.studeez.domain.LogService
|
import be.ugent.sel.studeez.domain.LogService
|
||||||
|
import be.ugent.sel.studeez.navigation.StudeezDestinations
|
||||||
import be.ugent.sel.studeez.screens.StudeezViewModel
|
import be.ugent.sel.studeez.screens.StudeezViewModel
|
||||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
@ -18,9 +20,10 @@ class SplashViewModel @Inject constructor(
|
||||||
|
|
||||||
showError.value = false
|
showError.value = false
|
||||||
if (accountDAO.hasUser) {
|
if (accountDAO.hasUser) {
|
||||||
// openAndPopUp( <homeScreen>, SPLASH_SCREEN)
|
// TODO should go to home screen
|
||||||
|
openAndPopUp( StudeezDestinations.SIGN_UP_SCREEN, StudeezDestinations.SPLASH_SCREEN)
|
||||||
} else{
|
} else{
|
||||||
// openAndPopUp(<login>, SPLASH_SCREEN)
|
openAndPopUp(StudeezDestinations.SIGN_UP_SCREEN, StudeezDestinations.SPLASH_SCREEN)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in a new issue