Skip to content

Commit

Permalink
Merge pull request #1568 from Expensify/jack-updateavatar
Browse files Browse the repository at this point in the history
Only use image thumbnail instead of full sized profile image
  • Loading branch information
Beamanator authored Apr 2, 2021
2 parents 106c52b + 1f64bb7 commit c052e58
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/libs/actions/PersonalDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ function getDefaultAvatar(login = '') {
* @returns {String}
*/
function getAvatar(personalDetail, login) {
if (personalDetail && personalDetail.avatar) {
return personalDetail.avatar.replace(/&d=404$/, '');
if (personalDetail && personalDetail.avatarThumbnail) {
return personalDetail.avatarThumbnail;
}

return getDefaultAvatar(login);
Expand Down Expand Up @@ -170,7 +170,8 @@ function getFromReportParticipants(reports) {
if (report.participants.length > 0) {
const avatars = _.map(report.participants, dmParticipant => ({
firstName: lodashGet(details, [dmParticipant, 'firstName'], ''),
avatar: lodashGet(details, [dmParticipant, 'avatar'], '') || getDefaultAvatar(dmParticipant),
avatar: lodashGet(details, [dmParticipant, 'avatarThumbnail'], '')
|| getDefaultAvatar(dmParticipant),
}))
.sort((first, second) => first.firstName - second.firstName)
.map(item => item.avatar);
Expand Down

0 comments on commit c052e58

Please sign in to comment.