-
Notifications
You must be signed in to change notification settings - Fork 372
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
Use collectAsStateWithLifecycle #5889
Use collectAsStateWithLifecycle #5889
Conversation
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.
Reviewed 28 of 28 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved
a92362e
to
5ccd4c9
Compare
5ccd4c9
to
be212ca
Compare
be212ca
to
6dead93
Compare
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 good, just a small thought since this PR does two things that is easy to miss in a future feature, do we want to add some konsist check for using collectAsLifecycle and that we want to call the state state
and not uiState
?
Reviewed 3 of 3 files at r2.
Reviewable status: 24 of 31 files reviewed, all discussions resolved (waiting on @albin-mullvad)
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.
Reviewed 3 of 3 files at r2, 7 of 7 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved
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.
Konsist does not allow for inspecting the variable names, only the signatures of methods and also import statements. So the alternatives would be:
- Ensure no composables take an argument that is named uiState
- We never import function collectAsState
Reviewable status:
complete! all files reviewed, all discussions resolved
6dead93
to
12a0137
Compare
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.
Both of those makes sense imo. Should be quite straight forward to add, right? I would say we go ahead and add those 🚀
Reviewed all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved
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.
Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved
2691360
to
ca56675
Compare
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.
Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved
Use
collectAsStateWithLifecycle
, and ensure all usesstate
as variable name instead ofuiState
.This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)