mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Update user profile update date on successful update.
// FREEBIE
This commit is contained in:
parent
9c0f94f1c0
commit
49e65ba1b1
1 changed files with 5 additions and 7 deletions
|
@ -668,12 +668,8 @@ static const NSInteger kProfileKeyLength = 16;
|
|||
avatarDigest = nil;
|
||||
}
|
||||
|
||||
BOOL isProfileNameSame = [self isNullableStringEqual:userProfile.profileName toString:profileName];
|
||||
BOOL isAvatarSame = ([self isNullableStringEqual:userProfile.avatarUrl toString:avatarUrl] &&
|
||||
[self isNullableDataEqual:userProfile.avatarDigest toData:avatarDigest]);
|
||||
if (isProfileNameSame && isAvatarSame) {
|
||||
return;
|
||||
}
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
userProfile.profileName = profileName;
|
||||
|
@ -683,11 +679,13 @@ static const NSInteger kProfileKeyLength = 16;
|
|||
if (!isAvatarSame) {
|
||||
// Evacuate avatar image cache.
|
||||
[self.otherUsersProfileAvatarImageCache removeObjectForKey:recipientId];
|
||||
|
||||
if (avatarUrl) {
|
||||
[self downloadProfileAvatarWithUrl:avatarUrl recipientId:recipientId];
|
||||
}
|
||||
}
|
||||
|
||||
if (avatarUrl) {
|
||||
[self downloadProfileAvatarWithUrl:avatarUrl recipientId:recipientId];
|
||||
}
|
||||
userProfile.lastUpdateDate = [NSDate new];
|
||||
|
||||
[self saveUserProfile:userProfile];
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue