diff --git a/app/src/main/java/com/android/periodpals/MainActivity.kt b/app/src/main/java/com/android/periodpals/MainActivity.kt index 90b9afb02..2bf441add 100644 --- a/app/src/main/java/com/android/periodpals/MainActivity.kt +++ b/app/src/main/java/com/android/periodpals/MainActivity.kt @@ -132,7 +132,7 @@ fun PeriodPalsApp(locationPermissionGranted: Boolean, authViewModel: AuthViewMod NavHost(navController = navController, startDestination = Route.AUTH) { // Authentication navigation( - startDestination = Screen.SIGN_UP, + startDestination = Screen.SIGN_IN, route = Route.AUTH, ) { composable(Screen.SIGN_IN) { SignInScreen(authViewModel, navigationActions) } diff --git a/app/src/main/java/com/android/periodpals/ui/profile/ProfileScreen.kt b/app/src/main/java/com/android/periodpals/ui/profile/ProfileScreen.kt index 85170d408..b2bf02310 100644 --- a/app/src/main/java/com/android/periodpals/ui/profile/ProfileScreen.kt +++ b/app/src/main/java/com/android/periodpals/ui/profile/ProfileScreen.kt @@ -45,6 +45,8 @@ fun ProfileScreen(userViewModel: UserViewModel, navigationActions: NavigationAct val user by userViewModel.user.collectAsStateWithLifecycle() + userViewModel.loadUserProfile() + Scaffold( modifier = Modifier.fillMaxSize().testTag("profileScreen"), bottomBar = { diff --git a/app/src/test/java/com/android/periodpals/model/user/UserViewModelTest.kt b/app/src/test/java/com/android/periodpals/model/user/UserViewModelTest.kt index 2e041a77c..c4f1c46a5 100644 --- a/app/src/test/java/com/android/periodpals/model/user/UserViewModelTest.kt +++ b/app/src/test/java/com/android/periodpals/model/user/UserViewModelTest.kt @@ -1,7 +1,6 @@ package com.android.periodpals.model.user import com.android.periodpals.MainCoroutineRule - import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest import org.junit.Assert.assertEquals