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

Allow display of user avatar in tab bar #593

Merged
merged 5 commits into from
Sep 11, 2023
Merged

Conversation

mormaer
Copy link
Collaborator

@mormaer mormaer commented Sep 10, 2023

Checklist

  • I have read CONTRIBUTING.md
  • I have described what this PR contains
  • This PR addresses one or more open issues that were assigned to me:
    - just a nice QoL improvement
  • If this PR alters the UI, I have attached pictures/videos

Pull Request Information

About this Pull Request

This PR adds logic to store the users avatar URL in the SavedAccount object and displays it on the tab bar. If the image fails to download it will fall back to the default symbol. There is also some logic that will update the stored value whenever we fetch the users profile... I've left a TODO to look at moving this into the repository layer longer term, but that is a larger project where we look to make the repositories capable of powering things in a more reactive way.

I've added a new option in the related settings screen so the user can choose to disable it displaying, and if they have set their display style to .anonymous it is always disabled.

Screenshots and Videos

DARK LIGHT
Screenshot 2023-09-10 at 21 09 20 Screenshot 2023-09-10 at 21 08 39
STANDARD ANONYMOUS
Screenshot 2023-09-10 at 21 09 56 Screenshot 2023-09-10 at 21 10 15

Additional Context

I noticed while making sure the avatar on the tab bar updates that when refreshing the UserView if the users avatar has been removed on web, or a new one added it does not update. I know you're doing some work on that view current @JakeShirley so it could be worth checking that? 🤞

@mormaer mormaer requested a review from a team as a code owner September 10, 2023 20:20
@mormaer mormaer requested review from JakeShirley and EricBAndrews and removed request for a team September 10, 2023 20:20
Copy link
Member

@JakeShirley JakeShirley left a comment

Choose a reason for hiding this comment

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

Thanks for the call out, I'll take a look!

@mormaer mormaer merged commit e0baae4 into dev Sep 11, 2023
4 checks passed
@mormaer mormaer deleted the display_user_avatar_in_tab_bar branch September 11, 2023 06:27
boscojwho pushed a commit to boscojwho/mlem that referenced this pull request Sep 16, 2023
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