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

[Home] 후원사 목록 뷰모델 및 UiState 구현 #152

Merged
merged 7 commits into from
Jul 31, 2023

Conversation

wisemuji
Copy link
Member

Issue

Overview (Required)

  • HomeViewModel에서 후원사 목록 조회 및 UI 연결
  • 후원사 등급이 높은 순서대로 정렬
  • 데이터가 연결되기 전까지 UseCase에서 가짜 데이터 내려주도록 구현

Screenshot

@wisemuji wisemuji requested a review from laco-dev July 31, 2023 12:34
@wisemuji wisemuji self-assigned this Jul 31, 2023
@@ -6,5 +6,5 @@ data class Sponsor(
val homepage: String,
val grade: Grade,
) {
enum class Grade { PLATINUM, GOLD, }
enum class Grade(val priority: Int) { PLATINUM(0), GOLD(1), }
Copy link
Member Author

Choose a reason for hiding this comment

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

enum 정렬 방법 후보

sponsors.sortedBy { it.grade } 
sponsors.sortedBy {
    when (it.grade) {
        Sponsor.Grade.PLATINUM -> 0
        Sponsor.Grade.GOLD -> 1
    }
}
enum class Grade(priority: Int) { PLATINUM(0), GOLD(1), }

sponsors.sortedBy { it.grade.priority } 

@wisemuji wisemuji requested a review from laco-dev July 31, 2023 13:31
Copy link
Contributor

@laco-dev laco-dev left a comment

Choose a reason for hiding this comment

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

LGTM 🐈 👍🏻 🐕

@wisemuji
Copy link
Member Author

바쁘신데도 빠른 확인 감사합니다!

@wisemuji wisemuji merged commit 71e43dd into droidknights:main Jul 31, 2023
@wisemuji wisemuji deleted the feature/#115 branch July 31, 2023 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Home] 후원사 목록 뷰모델 및 UiState 구현
3 participants