Fix profile picture updating

pull/313/head
nielsandriesse 4 years ago
parent 2a57b8ab5b
commit 896ca8f0bd

@ -1101,16 +1101,7 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error);
} else if (!image) {
OWSLogError(@"avatar image for %@ could not be loaded.", userProfile.recipientId);
} else {
[self updateProfileAvatarCache:image filename:fileName];
}
// If we're updating the profile that corresponds to our local number,
// update the local profile as well.
if ([self.tsAccountManager.localNumber isEqualToString:userProfile.recipientId]) {
OWSUserProfile *localUserProfile = self.localUserProfile;
OWSAssertDebug(localUserProfile);
[localUserProfile updateWithAvatarFileName:fileName dbConnection:self.dbConnection completion:nil];
[latestUserProfile updateWithAvatarFileName:fileName dbConnection:self.dbConnection completion:nil];
[self updateProfileAvatarCache:image filename:fileName];
}

Loading…
Cancel
Save