Allow display of user avatar in tab bar #593
Merged
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.
Checklist
- just a nice QoL improvement
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 aTODO
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
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? 🤞