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:
parent
c772db3baa
commit
a1a3749700
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user