mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Fix profile picture updating
This commit is contained in:
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…
Reference in a new issue