Skip to content

Commit

Permalink
fix: load user data in ProfileScreen
Browse files Browse the repository at this point in the history
  • Loading branch information
Harrish92 committed Oct 28, 2024
1 parent 00bd8e7 commit b6b298a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/android/periodpals/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit b6b298a

Please sign in to comment.