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

Read user avatar from cache #2565

Merged
merged 5 commits into from
Mar 18, 2024
Merged

Read user avatar from cache #2565

merged 5 commits into from
Mar 18, 2024

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Mar 18, 2024

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Ensure the user avatar in the room list is rendered even if there is no network. The avatar will also be rendered faster in case of slow network, since it's now read from cache.

In this PR the user profile will be read from cache, previously 2 network requests was trigger on in received Push. This will speed up the display of the notification and reduce the network request.

Motivation and context

Fast UI

Closes #2488

Screenshots / GIFs

Tests

  • Login to an account with a user which has an avatar: the avatar is rendered in the room list at top start.
  • Kill the app
  • enter airplane mode, so the device has no way to reach the homeserver
  • start the app
  • observe that the user avatar is rendered.

Previously the avatar was not rendered in this case.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@bmarty bmarty requested a review from a team as a code owner March 18, 2024 14:10
@bmarty bmarty requested review from jmartinesp and removed request for a team March 18, 2024 14:10
Copy link
Contributor

github-actions bot commented Mar 18, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/NtyUaZ

Copy link
Contributor

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

Thanks! The code looks good and the issue is fixed 👍 .

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 14 lines in your changes are missing coverage. Please review.

Project coverage is 73.12%. Comparing base (5169ed3) to head (a51855a).
Report is 5 commits behind head on develop.

Files Patch % Lines
.../notifications/DefaultNotificationDrawerManager.kt 14.28% 11 Missing and 1 partial ⚠️
...tures/preferences/impl/root/PreferencesRootView.kt 50.00% 1 Missing ⚠️
.../android/libraries/matrix/test/FakeMatrixClient.kt 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2565      +/-   ##
===========================================
- Coverage    73.14%   73.12%   -0.02%     
===========================================
  Files         1408     1407       -1     
  Lines        34103    34092      -11     
  Branches      6620     6617       -3     
===========================================
- Hits         24945    24931      -14     
- Misses        5698     5703       +5     
+ Partials      3460     3458       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bmarty bmarty added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Mar 18, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Mar 18, 2024
@bmarty
Copy link
Member Author

bmarty commented Mar 18, 2024

a51855a should fix the coverage drop.

Copy link

sonarcloud bot commented Mar 18, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@bmarty bmarty merged commit fb64018 into develop Mar 18, 2024
14 of 16 checks passed
@bmarty bmarty deleted the feature/bma/userDataCache branch March 18, 2024 16:33
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.

User avatar is reloaded on every app launch
3 participants