feat(profile): name a tip DM counterpart by handle - #734
Merged
Conversation
The profile screen reached from a chat header showed a display name and a join date, where Android's ProfileHeader also carries the counterpart's public @handle (node 9443:8928). Add that line, and with it Android's nameOrHandle rule: an account that never set a display name is titled by its handle rather than the generic "Flipcash User", and the handle line then drops out so it isn't read twice. CounterpartSeed carried an already-resolved displayName, which hid whether the counterpart had a name at all. It now carries the raw optional and the view model resolves the title. ConversationMember's proto init leaves displayName empty for a name-less account, so the handle titles the screen straight from the seed rather than after the profile fetch lands.
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.
The profile screen reached from a chat header showed a display name and a join date. Android's
ProfileHeaderalso carries the counterpart's public@handle(node 9443:8928), so iOS was missing an identity line the other platform has had.What changed
@handlesits under the name, above the join date, in.appTextSmall/.textSecondary. Name, handle and join date group at 5pt — Android'sgrid.x1— rather than the screen's uniform 16pt.UserProfileViewModelnow follows Android'snameOrHandle: an account that never set a display name is titled by its handle instead of the generic "Flipcash User", and the handle line then drops out so it isn't read twice. Android guards that line the same way; on iOS the guard could not have fired before, because there was no handle fallback to collide with.CounterpartSeedcarried an already-resolveddisplayName, which hid whether the counterpart had a name at all. It now carries the raw optional and the view model resolves the title.ConversationMember's proto init leavesdisplayNameempty for a name-less account, so the handle titles the screen straight from the seed rather than after the profile fetch lands.The avatar-to-name gap stays at the screen's existing 16pt. Android uses
grid.x2(10dp) there, but matching it would move a line that was already in place rather than fit the new one in.