mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2024-10-28 08:49:35 +01:00
contactmodel: do not save profile for account (managed by daemon)
Change-Id: I2943d91ad077892639a60117046665339e95d8fd
This commit is contained in:
parent
2215d51f98
commit
f524c39c5f
1 changed files with 3 additions and 7 deletions
|
@ -1220,15 +1220,11 @@ ContactModelPimpl::slotProfileReceived(const QString& accountId,
|
|||
}
|
||||
|
||||
if (peer == linked.owner.profileInfo.uri) {
|
||||
auto avatarChanged = profileInfo.avatar != linked.owner.profileInfo.avatar;
|
||||
auto aliasChanged = profileInfo.alias != linked.owner.profileInfo.alias;
|
||||
if (profileInfo.avatar.isEmpty())
|
||||
return; // In this case, probably a new device without avatar.
|
||||
// Only save the new profile once
|
||||
if (aliasChanged)
|
||||
linked.owner.accountModel->setAlias(linked.owner.id, profileInfo.alias, !avatarChanged);
|
||||
if (avatarChanged)
|
||||
linked.owner.accountModel->setAvatar(linked.owner.id, profileInfo.avatar, true);
|
||||
// Profile is saved by daemon, just update client
|
||||
linked.owner.accountModel->setAlias(linked.owner.id, profileInfo.alias, false);
|
||||
linked.owner.accountModel->setAvatar(linked.owner.id, profileInfo.avatar, false);
|
||||
return;
|
||||
}
|
||||
vCardFile.remove();
|
||||
|
|
Loading…
Reference in a new issue