Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(group): fix logic oversight and code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Kribylet committed Jun 14, 2019
1 parent c772db3 commit a1a3749
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/model/group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit a1a3749

Please sign in to comment.