Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX/#220] Group / state 변경 #224

Merged
merged 2 commits into from
Dec 5, 2024
Merged

[FIX/#220] Group / state 변경 #224

merged 2 commits into from
Dec 5, 2024

Conversation

TaewoongR
Copy link
Collaborator

📍 Work Description

  • UI 에서 사용되는 immutable model 선언

📢 To Reviewers

  • core:model을 그대로 사용하는 state가 있어서 stable하지 않는 문제를 수정했습니다.

⏲️Time

- 0.4시간

- core:model의 모델을 state로 사용 -> 화면 전용 immutable 모델 선언 및 state 사용
- core:model의 모델을 state로 사용 -> 화면 전용 immutable 모델 선언 및 state 사용
- uiState 선언시 등호 대신 by 사용하여 State 내부 타입 바로 접근
@TaewoongR TaewoongR added the 🛠️ fix 버그 및 오류 수정 label Dec 5, 2024
@TaewoongR TaewoongR self-assigned this Dec 5, 2024
@TaewoongR TaewoongR requested a review from a team as a code owner December 5, 2024 01:47
@TaewoongR TaewoongR requested review from Ameri-Kano, haeti-dev and shinythinking and removed request for a team December 5, 2024 01:47
Ameri-Kano

This comment was marked as off-topic.

Copy link
Collaborator

@Ameri-Kano Ameri-Kano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Immutable 한 UI Model 을 선언함으로서 컴포즈에서의 안정성을 챙기는 과정인거죠? 좋습니다!

Comment on lines +9 to +18
@Immutable
data class GroupUiModel(
val id: String,
val adminUser: String,
val createdAt: Date,
val description: String,
val imageUrl: String,
val name: String,
val members: ImmutableList<String>,
) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GroupUiModel에 꼭 Immutable을 붙여야 하는 이유가 Date 때문인가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이렇게 Immutable을 선언해도 해도 Date 객체가 java.util 에서 제공하는 거라 객체는 unstable이겠네요.
java.util 의 Date 대신 kotlinx 에서 제공하는 LocalDate 타입 쓰면 immutable 타입으로 사용 가능하다 하는데 이거로 대체하기에는 시간이 없네요 ㅠㅠ

@TaewoongR TaewoongR merged commit 3c71303 into develop Dec 5, 2024
3 checks passed
@TaewoongR TaewoongR deleted the fix/group-state branch December 6, 2024 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠️ fix 버그 및 오류 수정
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FIX] Group / State 설정
3 participants