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

New profile buttons started, not performing actions yet.

New system of Observers. Subscriptions on PeerData updates.
This commit is contained in:
John Preston
2016-05-24 19:13:07 +03:00
parent 41b330c5ea
commit e3e49dbeb8
19 changed files with 792 additions and 36 deletions

View File

@@ -419,6 +419,9 @@ public:
bool canWrite() const {
return access != UserNoAccess;
}
bool canShareThisContact() const {
return contact >= 0;
}
MTPInputUser inputUser;
@@ -675,9 +678,6 @@ public:
bool isPublic() const {
return flags & MTPDchannel::Flag::f_username;
}
bool canEditUsername() const {
return amCreator() && (flagsFull & MTPDchannelFull::Flag::f_can_set_username);
}
bool amCreator() const {
return flags & MTPDchannel::Flag::f_creator;
}
@@ -715,6 +715,12 @@ public:
bool canAddParticipants() const {
return amCreator() || amEditor() || (flags & MTPDchannel::Flag::f_democracy);
}
bool canEditPhoto() const {
return amCreator() || (amEditor() && isMegagroup());
}
bool canEditUsername() const {
return amCreator() && (flagsFull & MTPDchannelFull::Flag::f_can_set_username);
}
// ImagePtr photoFull;
QString invitationUrl;