2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Show admins in participants_hidden group info.

This commit is contained in:
John Preston
2022-12-23 17:13:32 +04:00
parent d6c188d642
commit ce40ecc7f9
17 changed files with 154 additions and 91 deletions

View File

@@ -263,8 +263,11 @@ bool ChannelData::linkedChatKnown() const {
void ChannelData::setMembersCount(int newMembersCount) {
if (_membersCount != newMembersCount) {
if (isMegagroup() && !mgInfo->lastParticipants.empty()) {
mgInfo->lastParticipantsStatus |= MegagroupInfo::LastParticipantsCountOutdated;
if (isMegagroup()
&& canViewMembers()
&& !mgInfo->lastParticipants.empty()) {
mgInfo->lastParticipantsStatus
|= MegagroupInfo::LastParticipantsCountOutdated;
mgInfo->lastParticipantsCount = membersCount();
}
_membersCount = newMembersCount;
@@ -485,7 +488,7 @@ bool ChannelData::isGroupAdmin(not_null<UserData*> user) const {
}
bool ChannelData::lastParticipantsRequestNeeded() const {
if (!mgInfo) {
if (!mgInfo || !canViewMembers()) {
return false;
} else if (mgInfo->lastParticipantsCount == membersCount()) {
mgInfo->lastParticipantsStatus