Merge branch 'charlesmchen/noAvatarInNewContacts'

pull/1/head
Matthew Chen 8 years ago
commit 1944979ac2

@ -69,10 +69,6 @@ extern const NSUInteger kOWSProfileManager_MaxAvatarDiameter;
- (nullable UIImage *)profileAvatarForRecipientId:(NSString *)recipientId;
// Reads raw avatar data from disk if available. Uncached, so shouldn't be used frequently,
// but useful to get the raw image data for populating cnContact.imageData without lossily re-encoding.
- (nullable NSData *)profileAvatarDataForRecipientId:(NSString *)recipientId;
- (void)refreshProfileForRecipientId:(NSString *)recipientId;
- (void)updateProfileForRecipientId:(NSString *)recipientId

@ -912,15 +912,6 @@ const NSUInteger kOWSProfileManager_MaxAvatarDiameter = 640;
}
}
- (nullable NSData *)profileAvatarDataForRecipientId:(NSString *)recipientId
{
UserProfile *userProfile = [self getOrBuildUserProfileForRecipientId:recipientId];
if (userProfile.avatarFileName.length > 0) {
return [self loadProfileDataWithFilename:userProfile.avatarFileName];
}
return nil;
}
- (nullable UIImage *)profileAvatarForRecipientId:(NSString *)recipientId
{
OWSAssert(recipientId.length > 0);

@ -413,7 +413,6 @@ NS_ASSUME_NONNULL_BEGIN
newContact.phoneNumbers = @[ labeledPhoneNumber ];
newContact.givenName = [self.profileManager profileNameForRecipientId:recipientId];
newContact.imageData = [self.profileManager profileAvatarDataForRecipientId:recipientId];
contactViewController = [CNContactViewController viewControllerForNewContact:newContact];
}

Loading…
Cancel
Save