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

fix(group): fix logic oversight and code style

This commit is contained in:
jenli669 2019-06-15 00:34:02 +02:00
parent c772db3baa
commit a1a3749700
No known key found for this signature in database
GPG Key ID: 8267F9F7C2BF7E5E

View File

@ -95,9 +95,11 @@ void Group::regeneratePeerList()
const int nPeers = peers.size();
for (int i = 0; i < nPeers; ++i) {
const auto pk = core->getGroupPeerPk(toxGroupNum, i);
if (pk == core->getSelfPublicKey())
if (pk == core->getSelfPublicKey()) {
peerDisplayNames[pk] = core->getUsername();
peerDisplayNames[pk] = FriendList::decideNickname(pk, peers[i]);
} else {
peerDisplayNames[pk] = FriendList::decideNickname(pk, peers[i]);
}
}
for (const auto& pk : oldPeerNames.keys()) {
if (!peerDisplayNames.contains(pk)) {