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

fix(profile): prepend user.updated_at to avatar url #266

Merged
merged 2 commits into from
Aug 20, 2017
Merged

fix(profile): prepend user.updated_at to avatar url #266

merged 2 commits into from
Aug 20, 2017

Conversation

machour
Copy link
Member

@machour machour commented Aug 17, 2017

Gives GitPoint an additional chance of refreshing an updated profile picture

Close #265

This gives GitPoint an additional chance of refreshing an updated profile picture
Closes #265
@@ -86,8 +86,8 @@ export const UserProfile = ({
<ImageZoom
uri={{
uri: initialUser.avatar_url
? initialUser.avatar_url
: user.avatar_url,
? `${initialUser.avatar_url}&cache=${initialUser.updated_at}`
Copy link
Member

@lex111 lex111 Aug 18, 2017

Choose a reason for hiding this comment

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

Although the param cache could be called for example dateUpdate (to make it more meaningful), but I would generally convert the date into a timestamp (+new Date(updated_at)), so it was cleaner, but I think it is superfluous.

Copy link
Member

Choose a reason for hiding this comment

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

I think lastModified might be the best query name to use so it's as close as possible to the last-modified header we would pass to the API.

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed to lastModified.
@lex111 keeping the value as it is, as it's easier to read for debugging purpose

Copy link
Member

@housseindjirdeh housseindjirdeh 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 this @machour <3

You might have mentioned on Gitter that this is not enough? Does having updated_at not always update if the user makes a change to their profile settings?

@housseindjirdeh housseindjirdeh merged commit 1579336 into gitpoint:master Aug 20, 2017
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.

None yet

4 participants