From 896ca8f0bd1ed0dad97a5738ae1b7ebe5e63c890 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Fri, 27 Nov 2020 12:45:20 +1100 Subject: [PATCH] Fix profile picture updating --- SignalUtilitiesKit/To Do/OWSProfileManager.m | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/SignalUtilitiesKit/To Do/OWSProfileManager.m b/SignalUtilitiesKit/To Do/OWSProfileManager.m index dc696f818..79934c779 100644 --- a/SignalUtilitiesKit/To Do/OWSProfileManager.m +++ b/SignalUtilitiesKit/To Do/OWSProfileManager.m @@ -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]; }