Conversation
- `UserDataRepository` 인터페이스를 정의하고 다음 기능을 포함합니다: - `userData`: `UserData`를 관찰할 수 있는 `Flow` 제공 - `setEmail(email: String)`: 사용자 이메일 설정 - `setNickname(nickname: String)`: 사용자 닉네임 설정 - `setProfileImage(profileImage: UserProfileImage)`: 사용자 프로필 이미지 설정
- `UserDataStore`를 사용하여 사용자 데이터(이메일, 닉네임, 프로필 이미지)를 관리하는 `OfflineFirstUserDataRepository` 구현 - `UserDataRepository` 인터페이스를 구현하며, `userData` Flow를 통해 사용자 데이터를 제공하고 각 설정 메서드를 통해 `UserDataStore`의 해당 함수를 호출
- `DataModule`에 `UserDataRepository`에 대한 바인딩 추가 - `OfflineFirstUserDataRepository`를 `UserDataRepository`의 구현체로 바인딩
- `homeSection` 함수 이름을 `homeScreen`으로 변경했습니다. - 홈 화면은 더 이상 `navigation` 블록을 사용하지 않고, `composable`로 직접 정의하여 route 중복 문제를 해결했습니다.
- HomeViewModel에서 UserDataRepository를 주입받아 사용자 닉네임 정보를 가져오도록 수정 - 사용자 닉네임을 StateFlow로 관리하여 UI에 실시간으로 반영
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PULL REQUEST
Home 화면에서 사용자 닉네임을 표시하기 위해
UserDataRepository를 정의하고, 구현 및 연결하는 작업입니다.Description
UserDataRepository 정의 및 구현
UserDataRepository인터페이스 정의userData:Flow<UserData>setEmail(email: String)setNickname(nickname: String)setProfileImage(profileImage: UserProfileImage)UserDataStore기반의OfflineFirstUserDataRepository구현DataModule에 DI 바인딩 추가Home 화면과 연결
HomeViewModel에서UserDataRepository를 주입받아userNickname상태로 변환StateFlow기반으로 닉네임 상태를 UI에 제공stateIn + SharingStarted.WhileSubscribed()을 활용하여 메모리 최적화네비게이션 충돌 해결
homeSection()의navigation()블록 사용을 제거하고homeScreen()으로 함수명 변경composable(route = HomeRoute)를 직접 정의하는 방식으로 변경하여 route 중복 충돌 해결네이밍 정리
UserDataStore.setProfile()→setProfileImage()로 함수명 명확화