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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user