Conversation
- 기존 임시 UI 전용 data class `Member`를 제거하고, 도메인 모델인 `GroupMember`를 사용하도록 수정했습니다. - `MemberAvatarCard` 컴포저블이 이제 `GroupMember`를 직접 받아 처리하도록 변경했습니다. - `MemberProfileImage` 타입에 대응하는 `painter()` 및 `backgroundColor()` 확장 함수를 `core:ui`에 추가하여, 도메인 모델과 UI 렌더링 간의 연결을 명확하게 했습니다.
…etailScreen - 기존 feature 모듈 내 임시 data class `GroupSchedule`을 제거하고, `core:model` 모듈에 정의된 도메인 모델로 교체했습니다. - 이에 따라 `ScheduleCard` 컴포저블의 `time` 파라미터를 `Long`에서 `LocalDateTime`으로, `location` 파라미터를 `String`에서 `Location` 타입으로 변경했습니다. - 시간 포맷터를 `SimpleDateFormat`에서 `DateTimeFormatter`로 전환하여 `LocalDateTime`에 맞게 대응했습니다. - `GroupDetailScreen`에서의 `ScheduleCard` 호출부 및 프리뷰 데이터를 도메인 모델 기반으로 수정했습니다.
- 그룹 상세 정보를 가져오는 `GroupDetailViewModel`을 새로 생성했습니다. - `GroupRepository`를 통해 그룹 정보를 조회하고, 결과를 `GroupDetailUiState`로 변환하여 UI 상태로 관리합니다. - `ScheduleRepository`를 통해 약속 목록을 Paging 방식으로 가져오며, `cachedIn(viewModelScope)`로 캐시 처리합니다. - 네비게이션 경로에서 전달받은 `groupId`를 `SavedStateHandle`을 통해 추출합니다. - 로딩, 성공, 실패를 나타내는 sealed class 기반 `GroupDetailUiState`를 정의했습니다.
- `GroupDetailViewModel`을 화면에 연결하여 그룹 멤버 및 약속 데이터를 ViewModel을 통해 주입받도록 변경했습니다. - 그룹 상세 정보는 `GroupDetailUiState`로 관리하며, 로딩/성공/에러 상태를 구분합니다. - 약속 목록은 Paging 기반으로 구성하고, `LazyPagingRow`를 통해 스크롤 시 자동 로드됩니다. - 탭 선택에 따라 멤버 목록과 약속 목록을 구분해 상태 기반으로 처리합니다.
- `feature:groups` 모듈을 `feature:group-detail`로 리네이밍했습니다. - 모듈 이름 변경에 따라 `package`, `namespace`, `settings.gradle.kts`, `build.gradle.kts`의 경로 및 참조를 일괄 수정했습니다.
- `GroupMember.memberId`를 `id`로, `GroupSchedule.scheduleId`를 `id`로 변경하여 식별자 필드를 통일했습니다.
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
GroupDetailScreen 전반의 UI 임시 모델을 제거하고 도메인 모델로 전환했으며, ViewModel을 적용하여 상태 기반 UI로 리팩터링했습니다.
Description
임시 모델 제거 및 도메인 모델 전환
Member,GroupSchedule을 제거하고,core:model모듈에 정의된 도메인 모델GroupMember,GroupSchedule로 일괄 교체했습니다.UI 컴포저블 개선
MemberAvatarCard컴포저블이 더 이상Member를 받지 않고,GroupMember를 직접 사용하도록 변경했습니다.GroupMember.profileImage의 타입인MemberProfileImage에 대해 UI 렌더링을 위한 확장 함수painter()와backgroundColor()를core:ui모듈에 추가하여,도메인 모델과 UI 렌더링 간 연결 지점을 명확하게 정의했습니다.
ScheduleCard는 다음과 같은 파라미터 타입 변경을 반영했습니다:time: Long→time: LocalDateTimelocation: String→location: LocationViewModel 도입 및 상태 기반 UI 구조화
GroupDetailViewModel을 새로 생성하여 다음 로직을 담당합니다:GroupRepository로부터 그룹 상세 정보를 비동기 로드하고,GroupDetailUiState로 변환해 상태 관리ScheduleRepository로부터 약속 목록을 Paging 방식으로 가져와LazyPagingRow에 대응SavedStateHandle을 통해groupId를 안전하게 추출하여 로딩에 활용모듈 구조 개선
feature:groups모듈명을feature:group-detail로 변경하고, 이에 따른 패키지명, 네임스페이스,settings.gradle.kts,build.gradle.kts를 모두 수정했습니다.결과적으로 기대되는 효과