2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Edit pre-history visibility in megagroups.

This commit is contained in:
John Preston
2017-11-22 12:04:45 +04:00
parent 2387b66e86
commit 542ba89f25
5 changed files with 167 additions and 12 deletions

View File

@@ -736,13 +736,11 @@ void ApiWrap::applyLastParticipantsList(
if (!keyboardBotFound) {
h->clearLastKeyboard();
}
int newMembersCount = qMax(fullCount, list.size());
if (newMembersCount > peer->membersCount()) {
peer->setMembersCount(newMembersCount);
}
if (!bots) {
if (list.isEmpty()) {
peer->setMembersCount(peer->mgInfo->lastParticipants.size());
} else {
peer->setMembersCount(fullCount);
}
Notify::PeerUpdate update(peer);
update.flags |= Notify::PeerUpdate::Flag::MembersChanged | Notify::PeerUpdate::Flag::AdminsChanged;