Shared media block done in the new profile implementation.

Preparing to call Notify::peerUpdatedSendDelayed() only from event loop.
This commit is contained in:
John Preston
2016-06-02 16:02:55 +03:00
parent 3fc7cc3453
commit 2c4ec3d9f3
35 changed files with 646 additions and 193 deletions
+18
View File
@@ -516,6 +516,24 @@ void ChannelData::setInviteLink(const QString &newInviteLink) {
}
}
void ChannelData::setMembersCount(int newMembersCount) {
if (_membersCount != newMembersCount) {
if (isMegagroup() && !mgInfo->lastParticipants.isEmpty()) {
mgInfo->lastParticipantsStatus |= MegagroupInfo::LastParticipantsCountOutdated;
mgInfo->lastParticipantsCount = membersCount();
}
_membersCount = newMembersCount;
Notify::peerUpdatedDelayed(this, Notify::PeerUpdate::Flag::MembersChanged);
}
}
void ChannelData::setAdminsCount(int newAdminsCount) {
if (_adminsCount != newAdminsCount) {
_adminsCount = newAdminsCount;
Notify::peerUpdatedDelayed(this, Notify::PeerUpdate::Flag::AdminsChanged);
}
}
void ChannelData::flagsUpdated() {
if (isMegagroup()) {
if (!mgInfo) {