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