Login screen fixed
This commit is contained in:
@@ -27,5 +27,5 @@ object LocalDataSource {
|
|||||||
appContext.dataStore.edit { it[Keys.CODE] = code }
|
appContext.dataStore.edit { it[Keys.CODE] = code }
|
||||||
}
|
}
|
||||||
|
|
||||||
val isCodePresentFlow: Flow<Boolean> = appContext.dataStore.data.map { it[Keys.CODE] != "" || it[Keys.CODE] != null }
|
val isCodePresentFlow: Flow<Boolean> = appContext.dataStore.data.map { it[Keys.CODE] != "" && it[Keys.CODE] != null }
|
||||||
}
|
}
|
||||||
@@ -34,7 +34,7 @@ fun AppNavHost(
|
|||||||
codePresence: Boolean?
|
codePresence: Boolean?
|
||||||
) {
|
) {
|
||||||
val startDestination = if (codePresence == null) SplashScreenDestination
|
val startDestination = if (codePresence == null) SplashScreenDestination
|
||||||
else if (codePresence == true) MainScreenDestination
|
else if (codePresence) MainScreenDestination
|
||||||
else AuthScreenDestination
|
else AuthScreenDestination
|
||||||
|
|
||||||
NavHost(
|
NavHost(
|
||||||
|
|||||||
Reference in New Issue
Block a user