1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Fix group name changes not displaying

This commit is contained in:
tux3 2015-09-14 20:25:16 +02:00
parent 6229e045f2
commit 54fc35e714
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
3 changed files with 7 additions and 1 deletions

View File

@ -99,6 +99,11 @@ QString Friend::getDisplayedName() const
return userAlias;
}
bool Friend::hasAlias() const
{
return !userAlias.isEmpty();
}
const ToxId &Friend::getToxId() const
{
return userID;

View File

@ -43,6 +43,7 @@ public:
void setName(QString name);
void setAlias(QString name);
QString getDisplayedName() const;
bool hasAlias() const;
void setStatusMessage(QString message);

View File

@ -76,7 +76,7 @@ void Group::updatePeer(int peerId, QString name)
peers[peerId] = name;
toxids[toxid] = name;
Friend *f = FriendList::findFriend(id);
if (f)
if (f && f->hasAlias())
{
peers[peerId] = f->getDisplayedName();
toxids[toxid] = f->getDisplayedName();