Fix: Avatar is not visible when the profile is disabled but the Avatar is set to public #568
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.
Closes #567
Description
This PR adjusts the
ProfileCard
component in the QuickEditor to show the Avatar when it's set to public even if the profile is set to private.To accomplish this I had to create a new
Avatar
component that takes theEmail
and not theComponentState
. It now relies on the Coil callback to show either the Loading or Error state. Loading is for the Skeleton and the Error is for the empty avatar image. Here's how it looks now with a private profile:This won't be the default behavior of all the Profile cards from the
:ui
module though, due to theComponentState
- we can only get the email from the profile once it's loaded, and at that point, this is a bit late. Even if we wanted to fall back when a profile can't be loaded (ComponentState.Empty) we wouldn't have any profile information. So that would require some API updates.Testing Steps
public profile
but keep the avatar publicpublic avatar
settings