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

Actions block done for the new profile implementation.

User block status moved to private data.
Notify::PeerUpdateFlag[s] moved to Notify::PeerUpdate::Flag[s].
This commit is contained in:
John Preston
2016-06-01 23:05:37 +03:00
parent 15d6a1aacf
commit 3fc7cc3453
28 changed files with 647 additions and 179 deletions

View File

@@ -388,12 +388,6 @@ struct BotInfo {
PeerId inlineReturnPeerId = 0;
};
enum UserBlockedStatus {
UserBlockUnknown = 0,
UserIsBlocked,
UserIsNotBlocked,
};
class PhotoData;
class UserData : public PeerData {
public:
@@ -457,7 +451,19 @@ public:
Text phoneText;
TimeId onlineTill = 0;
int32 contact = -1; // -1 - not contact, cant add (self, empty, deleted, foreign), 0 - not contact, can add (request), 1 - contact
UserBlockedStatus blocked = UserBlockUnknown;
enum class BlockStatus {
Unknown,
Blocked,
NotBlocked,
};
BlockStatus blockStatus() const {
return _blockStatus;
}
bool isBlocked() const {
return (blockStatus() == BlockStatus::Blocked);
}
void setBlockStatus(BlockStatus blockStatus);
typedef QList<PhotoData*> Photos;
Photos photos;
@@ -481,6 +487,7 @@ private:
QString _restrictionReason;
QString _about;
QString _phone;
BlockStatus _blockStatus = BlockStatus::Unknown;
};