-
Notifications
You must be signed in to change notification settings - Fork 204
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
♻️ [SponsorsScreen]Added loading indicator since it is missing. #950
♻️ [SponsorsScreen]Added loading indicator since it is missing. #950
Conversation
val supporters = sponsors.filter { it.plan == SUPPORTER }.toPersistentList() | ||
|
||
val platinumSponsorsUiState = if (platinumSponsors.isNotEmpty()) { | ||
PlatinumSponsorsUiState.Exists( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about making one big state instead of making for each category?
sealed interface SponsorsListUiState{
data class Exists(
val platinumSponsors: PersistentList<Sponsor>,
val goldSponsors: PersistentList<Sponsor>,
val supporters: PersistentList<Sponsor>,
)
object Loading
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@takahirom
The issues you pointed out have already been dealt with, so your PR is ready to be reviewed. 🫡
d80ba13
…at they are all held as a single UiState.
sponsor = sponsor, | ||
onSponsorsItemClick = onSponsorsItemClick, | ||
) | ||
when (uiState) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, but if you want to show the progress for each section, the previous UI state definition is better. (I have so many PRs to review, and I don't have time to look into this a lot 🙇). Can we have a Slot API pattern-like method for each category? These boilerplate codes are a little messy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@takahirom
I restored UiState and reduced redundant processing. 🫡
…changed so that they are all held as a single UiState." This reverts commit d80ba13.
Snapshot diff report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thank you for considering the solution with us.
Issue
Overview (Required)
Movie (Optional)
before.mp4
after.mp4