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 avatar sometimes not loading #3366

Merged
merged 4 commits into from
Sep 3, 2024
Merged

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Aug 30, 2024

Content

It seems that since the last SDK release, Client.getMediaThumbnail cannot be run in multiple thread, else the SDK report a locked database error. The last commit of this PR add a mutex.

First commit are just rework, name change, and adding log to help investigating such issues.

Motivation and context

Closes #3354

Screenshots / GIFs

Tests

Using an account with many rooms:

  • kill the app
  • start the app
  • filter the room list on People
  • observe that with this change, all the avatar are loaded.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

@bmarty bmarty requested a review from a team as a code owner August 30, 2024 11:45
@bmarty bmarty requested review from ganfra and removed request for a team August 30, 2024 11:45
@bmarty bmarty added the PR-Bugfix For bug fix label Aug 30, 2024
Copy link
Contributor

github-actions bot commented Aug 30, 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/Hpsrsj

Copy link

codecov bot commented Aug 30, 2024

Codecov Report

Attention: Patch coverage is 0% with 26 lines in your changes missing coverage. Please review.

Project coverage is 82.61%. Comparing base (f40480e) to head (cdf6900).
Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
...raries/matrix/ui/media/AvatarDataFetcherFactory.kt 0.00% 8 Missing ⚠️
...roid/libraries/matrix/ui/media/CoilMediaFetcher.kt 0.00% 8 Missing ⚠️
.../matrix/ui/media/MediaRequestDataFetcherFactory.kt 0.00% 8 Missing ⚠️
.../libraries/matrix/ui/media/ImageLoaderFactories.kt 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3366      +/-   ##
===========================================
- Coverage    82.62%   82.61%   -0.02%     
===========================================
  Files         1683     1685       +2     
  Lines        39456    39462       +6     
  Branches      4798     4800       +2     
===========================================
+ Hits         32602    32603       +1     
- Misses        5174     5180       +6     
+ Partials      1680     1679       -1     

☔ 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 Aug 30, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Aug 30, 2024
@ganfra
Copy link
Member

ganfra commented Sep 2, 2024

Fix on the sdk is on his way : matrix-org/matrix-rust-sdk#3928

Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

Lets remove the fix and keep everything else as the issue is now fixed in the sdk.

@bmarty bmarty force-pushed the feature/bma/fixAvatarLoading branch from cdf6900 to e35ba7a Compare September 3, 2024 08:19
@bmarty
Copy link
Member Author

bmarty commented Sep 3, 2024

Done, thanks!

Copy link

sonarcloud bot commented Sep 3, 2024

@bmarty bmarty merged commit ae3fd89 into develop Sep 3, 2024
23 of 25 checks passed
@bmarty bmarty deleted the feature/bma/fixAvatarLoading branch September 3, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Bugfix For bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avatars randomly not loading
2 participants