Repository navigation
fix(share): title every profile share "Chat with <name> on Flipcash" - #927
Merged
Merged
Conversation
The four places that share a profile link each picked their own title: the You tab and the tip card screen used "Tip <name>" (falling back to "My Tip Card"), another user's profile used the display name or handle, and the share-profile chat widget used the @handle or the raw URL. TipCodeShareItem.profile(url:displayName:) now builds the title from one localized string for all of them, and a missing display name shares the link untitled. This matches Android (code-payments/code-android-app#1635). The chat widget passes up the display name its lookup resolved, so the title names the person rather than their handle. The shared links are unchanged.
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.
Profile shares had four different titles depending on where you shared from. They now all use "Chat with on Flipcash", matching Android (code-payments/code-android-app#1635).
YouScreen)TipcardScreen)UserProfileScreen)ConversationScreen)The title comes from
TipCodeShareItem.profile(url:displayName:), which holds the one localized string. With no display name it returns no title and shares only the link. For the chat widget,ChatShareProfileCellpasses up the display name its lookup resolved, soonShareProfilenow takes(LinkCard.User, String?).The shared links are unchanged:
URL.tipcard(for:username:)still givesflipcash.com/<username>when there's a handle, or the lowercase user id when there isn't. The chat widget still sharesusername.profileURL.ProfileShareTitleTestscovers the title with a name, with nil, and with an empty string.