-
Notifications
You must be signed in to change notification settings - Fork 155
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
Improve avatar rendering #3642
Improve avatar rendering #3642
Conversation
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
0d6c6a9
to
e0d2eae
Compare
…mbnail so caching works properly.
e0d2eae
to
2e631b1
Compare
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3642 +/- ##
========================================
Coverage 82.82% 82.83%
========================================
Files 1747 1747
Lines 41742 41737 -5
Branches 5102 5102
========================================
Hits 34572 34572
+ Misses 5355 5350 -5
Partials 1815 1815 ☔ View full report in Codecov by Sentry. |
Content
This PR takes care of using a single thumbnail request size, so caching works properly.
Indeed, according to the matrix specs :
For rendering avatar we could use crop, but it's not available in the rust sdk yet.
So instead, always use the smallest scale function ie. requesting with a size <= 240 pixels would makes sure we do.
This way, we'll be hitting the server only once per mxc url, and not for each size we've defined in our AvatarSize.
Motivation and context
Improve rendering by removing useless network calls.
Screenshots / GIFs
Tests
Tested devices
Checklist