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

Update avatar image loading logics (PSB-198) #6927

Merged
merged 5 commits into from
Oct 20, 2022

Conversation

alfogrillo
Copy link
Contributor

Ticket: https://element-io.atlassian.net/browse/PSB-198

Description
This PR makes the avatar image loading more robust:

  • Adding multiple fallback images
  • Setting the fallback before the avatar url is fetched to avoid leaving a blank image view

Fixes: #6847

@alfogrillo alfogrillo requested review from a team and aringenbach and removed request for a team October 18, 2022 14:05
@sonarcloud
Copy link

sonarcloud bot commented Oct 18, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@codecov
Copy link

codecov bot commented Oct 18, 2022

Codecov Report

Base: 54.86% // Head: 11.76% // Decreases project coverage by -43.09% ⚠️

Coverage data is based on head (5043ece) compared to base (6b27303).
Patch coverage: 8.20% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #6927       +/-   ##
============================================
- Coverage    54.86%   11.76%   -43.10%     
============================================
  Files          423     1594     +1171     
  Lines        16607   156625   +140018     
  Branches      6743    63252    +56509     
============================================
+ Hits          9111    18431     +9320     
- Misses        7288   137571   +130283     
- Partials       208      623      +415     
Flag Coverage Δ
uitests 54.88% <55.00%> (?)
unittests 6.15% <1.64%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
Config/BuildSettings.swift 43.07% <ø> (+43.07%) ⬆️
Riot/Modules/Common/Avatar/AvatarView.swift 35.29% <0.00%> (ø)
Riot/Modules/Common/Avatar/AvatarViewData.swift 0.00% <0.00%> (ø)
...Modules/Common/Avatar/AvatarViewDataProtocol.swift 0.00% <0.00%> (ø)
Riot/Modules/Room/CellData/RoomBubbleCellData.m 0.00% <0.00%> (ø)
...ngs/UIKit/RoomNotificationSettingsAvatarView.swift 0.00% <0.00%> (ø)
Riot/Modules/Room/RoomCoordinator.swift 0.00% <0.00%> (ø)
Riot/Modules/Room/RoomViewController.m 0.00% <0.00%> (ø)
...lls/Styles/Bubble/BubbleRoomTimelineCellProvider.m 0.00% <0.00%> (ø)
...st/Incoming/VoiceBroadcastIncomingBubbleCell.swift 0.00% <0.00%> (ø)
... and 1221 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@alfogrillo alfogrillo requested review from a team and gileluard and removed request for aringenbach and a team October 20, 2022 10:09
Copy link
Contributor

@gileluard gileluard left a comment

Choose a reason for hiding this comment

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

lgtm

@alfogrillo alfogrillo merged commit 1fd34d9 into develop Oct 20, 2022
@alfogrillo alfogrillo deleted the alfogrillo/6847_avatar_image branch October 20, 2022 13:05
@alfogrillo alfogrillo mentioned this pull request Oct 20, 2022
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.

Settings screen not accessible because avatar button is invisible
2 participants