Skip to content
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

Render current-user profile picture/display name in chat screen (290) #304

Closed
wants to merge 2 commits into from

Conversation

Nqnt41
Copy link

@Nqnt41 Nqnt41 commented Oct 29, 2024

Part of Issue #254. Updated SettingsStore.ts to store/provide update functions for user display name, profile picture index, and profile hex color. Changed SettingsScreen.tsx to allow dynamic updates to each value. In ChatMessage.tsx, allowed rendering of the stored display name, profile picture, profile color. Moved icon paths from SettingsScreen.tsx to new icons.ts file.

Nqnt41 and others added 2 commits October 29, 2024 17:24
Updated SettingsStore.ts to store/provide update functions for user display name, profile picture index, and profile hex color. Changed SettingsScreen.tsx to allow dynamic updates to each value. In ChatMessage.tsx, allowed rendering of the stored display name, profile picture, profile color. Moved icon paths from SettingsScreen.tsx to new icons.ts file.
Copy link
Collaborator

@dyland88 dyland88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead, I would change the code inside onHandleSubmit in chatScreen to get the value from the settingsstore rather than the user context which is currently unused. Same thing with the profile icon.

/>
</View>
<View style={styles.contentContainer}>
<View style={styles.messageHeader}>
<Text style={authorStyleProps}>{author}</Text>
<Text style={authorStyleProps}>{profileSettings.displayName}</Text>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you change this prop to point to the display name, then every message will just show that it was written by you, rather than the person that actually sent the message. Just leave it as "author"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood! I'll work on these changes now.

@Nqnt41
Copy link
Author

Nqnt41 commented Nov 15, 2024

Sent an updated pull request that fixes these changes, #312.

@Nqnt41 Nqnt41 closed this Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants