fix: blinking placeholder avatar on profile screen [WPB-3917] #2201
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.
Cherry pick from the original PR:
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
When opening any profile screen, a placeholder image appears for a short amount of time before the proper avatar is loaded, even if the image is already cached.
Solutions
Provide a small delay of 200ms before showing the placeholder when loading proper avatar which is enough to fetch data from database and get the cached image, so it doesn't need to show the placeholder, only when the image is not already cached and needs to be downloaded, but even then it looks better together with the crossfade animation and new transition animations between screens.
Testing
How to Test
Open any profile screen.
Attachments (Optional)
These before/after videos are recorded with disabled transition animations to better see how exactly it looks.
avatars_before.mp4
profile_avatars_after.mp4
profile_avatars_after_with_transitions.mp4
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.