feat(navbar): show the profile photo on the You tab - #1347
Merged
Conversation
Node 9641:17130 replaces the You tab's glyph with the account's own avatar once a photo is set: a circle inset in the icon slot, ringed in white, fading with the tab like the other glyphs. NavigationBar lives in core-ui, below the profile layer, so it takes the avatar as a slot and keeps the glyph when the caller passes null. AppNavigationBar reads the picture from UserManager, gated on Ready for the same reason as the rest of the profile-driven chrome: a named account restores its cached profile before auth completes, so an ungated read would show the previous account's avatar on the way in.
The profile read, its Ready gate and the slot it produces are one idea; giving them a name keeps AppNavigationBar's body to the three flows it reads. The distinctUntilChanged goes with it — collectAsStateWithLifecycle already skips an equal value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Node 9641:17130 replaces the You tab's glyph with the account's own avatar once a photo is set: a circle inset in the icon slot, ringed in white, fading with the tab like the other glyphs. Without a photo the tab keeps
ic_nav_tipcard.NavigationBarlives in:apps:flipcash:core-ui, below the profile layer, so it takes the avatar as a slot rather than reaching for aMediaItemitself.AppNavigationBarsupplies it viaContactAvatar, which picks the rendition matching the measured size and bridges the load with the item's BlurHash.The read from
UserManageris gated onAuthState.Ready, matching the tip card and the profile checklist: a named account restores its cached profile before auth completes, so an ungated read would show the previous account's avatar on the way in.The white ring is drawn over the photo rather than behind it, so it survives whatever background the avatar paints for itself.