diff --git a/app/src/main/java/ru/myitschool/work/data/source/LocalDataSource.kt b/app/src/main/java/ru/myitschool/work/data/source/LocalDataSource.kt index c41b351..2714061 100644 --- a/app/src/main/java/ru/myitschool/work/data/source/LocalDataSource.kt +++ b/app/src/main/java/ru/myitschool/work/data/source/LocalDataSource.kt @@ -27,5 +27,5 @@ object LocalDataSource { appContext.dataStore.edit { it[Keys.CODE] = code } } - val isCodePresentFlow: Flow = appContext.dataStore.data.map { it[Keys.CODE] != "" || it[Keys.CODE] != null } + val isCodePresentFlow: Flow = appContext.dataStore.data.map { it[Keys.CODE] != "" && it[Keys.CODE] != null } } \ No newline at end of file diff --git a/app/src/main/java/ru/myitschool/work/ui/screen/NavigationGraph.kt b/app/src/main/java/ru/myitschool/work/ui/screen/NavigationGraph.kt index a87d511..65f3745 100644 --- a/app/src/main/java/ru/myitschool/work/ui/screen/NavigationGraph.kt +++ b/app/src/main/java/ru/myitschool/work/ui/screen/NavigationGraph.kt @@ -34,7 +34,7 @@ fun AppNavHost( codePresence: Boolean? ) { val startDestination = if (codePresence == null) SplashScreenDestination - else if (codePresence == true) MainScreenDestination + else if (codePresence) MainScreenDestination else AuthScreenDestination NavHost(