From 377bf03818e68dfae8f365822367fabb7c8feb4a Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Wed, 22 Jan 2025 15:53:13 +0100 Subject: [PATCH] Fix empty display name after setting friend in favorites. --- Linphone/model/friend/FriendModel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Linphone/model/friend/FriendModel.cpp b/Linphone/model/friend/FriendModel.cpp index 5df7f3302..a35bc1b5a 100644 --- a/Linphone/model/friend/FriendModel.cpp +++ b/Linphone/model/friend/FriendModel.cpp @@ -53,7 +53,7 @@ FriendModel::FriendModel(const std::shared_ptr &contact, const QStringList fullName; fullName << getGivenName() << getFamilyName(); fullName.removeAll(""); - setFullName(fullName.join(" ")); + if (fullName.size() > 0) setFullName(fullName.join(" ")); }; connect(this, &FriendModel::givenNameChanged, updateFullName); connect(this, &FriendModel::familyNameChanged, updateFullName); @@ -177,7 +177,7 @@ QString FriendModel::getFullName() const { void FriendModel::setFullName(const QString &name) { if (mFullName != name) { mFullName = name; - emit fullNameChanged(name); + emit fullNameChanged(getFullName()); } }