Skip to content

Commit

Permalink
Merge branch 'task/gravatar-integration' into gravatar/etoledom/using…
Browse files Browse the repository at this point in the history
…-fetch-profile-from-gravatar-sdk
  • Loading branch information
pinarol committed Feb 21, 2024
2 parents d72bcfd + 4035beb commit 109e40d
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ fileprivate extension UIBarButtonItem {
gravatarImageView.contentMode = .scaleAspectFill

if let email = email {
gravatarImageView.downloadGravatarWithEmail(email, placeholderImage: GravatarConfiguration.fallBackImage)
gravatarImageView.downloadGravatar(for: email, placeholderImage: GravatarConfiguration.fallBackImage)
} else {
gravatarImageView.image = GravatarConfiguration.fallBackImage
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ private extension CommentContentTableViewCell {
return
}

avatarImageView.downloadGravatarWithEmail(someEmail, placeholderImage: Style.placeholderImage)
avatarImageView.downloadGravatar(for: someEmail, placeholderImage: Style.placeholderImage)
}

func updateContainerLeadingConstraint() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class MyProfileHeaderView: UITableViewHeaderFooterView {
var gravatarEmail: String? = nil {
didSet {
if let email = gravatarEmail {
gravatarImageView.downloadGravatarWithEmail(email, rating: GravatarRatings.x)
gravatarImageView.downloadGravatar(for: email, gravatarRating: .x)
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion WordPress/Classes/ViewRelated/Me/Views/Header/MeHeaderView.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#import "MeHeaderView.h"
#import "Blog.h"
#import "WordPress-Swift.h"
#import "Gravatar-Swift.h"

const CGFloat MeHeaderViewHeight = 154;
const CGFloat MeHeaderViewGravatarSize = 64.0;
Expand Down Expand Up @@ -67,7 +68,7 @@ - (NSString *)username
- (void)setGravatarEmail:(NSString *)gravatarEmail
{
// Since this view is only visible to the current user, we should show all ratings
[self.gravatarImageView downloadGravatarWithEmail:gravatarEmail rating:GravatarRatingsX];
[self.gravatarImageView downloadGravatarFor:gravatarEmail gravatarRating:GravatarRatingX];
_gravatarEmail = gravatarEmail;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class EpilogueUserInfoCell: UITableViewCell {
gravatarView.downloadImage(from: url)
} else {
let placeholder: UIImage = allowGravatarUploads ? .gravatarUploadablePlaceholderImage : .gravatarPlaceholderImage
gravatarView.downloadGravatarWithEmail(userInfo.email, rating: .x, placeholderImage: placeholder)
gravatarView.downloadGravatar(for: userInfo.email, gravatarRating: .x, placeholderImage: placeholder)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class NoteBlockCommentTableViewCell: NoteBlockTextTableViewCell {
return
}

gravatarImageView.downloadGravatarWithEmail(unwrappedEmail, placeholderImage: placeholderImage)
gravatarImageView.downloadGravatar(for: unwrappedEmail, placeholderImage: placeholderImage)
}

// MARK: - View Methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ final class AuthorFilterButton: UIControl {
case .user(let email):
authorImageView.contentMode = .scaleAspectFill
if let email = email {
authorImageView.downloadGravatarWithEmail(email, placeholderImage: gravatarPlaceholder)
authorImageView.downloadGravatar(for: email, placeholderImage: gravatarPlaceholder)
} else {
authorImageView.image = gravatarPlaceholder
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ private class AuthorFilterCell: UITableViewCell {

let placeholder = UIImage(named: "comment-author-gravatar")
if let email = email {
gravatarImageView.downloadGravatarWithEmail(email, placeholderImage: placeholder ?? UIImage())
gravatarImageView.downloadGravatar(for: email, placeholderImage: placeholder ?? UIImage())
} else {
gravatarImageView.image = placeholder
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class ListTableViewCell: UITableViewCell, NibReusable {
return
}

avatarView.downloadGravatarWithEmail(someEmail, placeholderImage: placeholderImage)
avatarView.downloadGravatar(for: someEmail, placeholderImage: placeholderImage)
}

// MARK: Overlay View Support
Expand Down

0 comments on commit 109e40d

Please sign in to comment.