mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge pull request #5919
Mick Sayson (1): fix(groups): Fix invalid group list on group member join
This commit is contained in:
commit
7349b44154
|
@ -1502,7 +1502,9 @@ QStringList Core::getGroupPeerNames(int groupId) const
|
||||||
for (uint32_t i = 0; i < nPeers; ++i) {
|
for (uint32_t i = 0; i < nPeers; ++i) {
|
||||||
Tox_Err_Conference_Peer_Query error;
|
Tox_Err_Conference_Peer_Query error;
|
||||||
size_t length = tox_conference_peer_get_name_size(tox.get(), groupId, i, &error);
|
size_t length = tox_conference_peer_get_name_size(tox.get(), groupId, i, &error);
|
||||||
|
|
||||||
if (!PARSE_ERR(error) || !length) {
|
if (!PARSE_ERR(error) || !length) {
|
||||||
|
names.append(QString());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1510,9 +1512,13 @@ QStringList Core::getGroupPeerNames(int groupId) const
|
||||||
tox_conference_peer_get_name(tox.get(), groupId, i, nameBuf.data(), &error);
|
tox_conference_peer_get_name(tox.get(), groupId, i, nameBuf.data(), &error);
|
||||||
if (PARSE_ERR(error)) {
|
if (PARSE_ERR(error)) {
|
||||||
names.append(ToxString(nameBuf.data(), length).getQString());
|
names.append(ToxString(nameBuf.data(), length).getQString());
|
||||||
|
} else {
|
||||||
|
names.append(QString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(names.size() == nPeers);
|
||||||
|
|
||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user