2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

ReportSpamPanel -> HistoryView::ContactStatus.

This commit is contained in:
John Preston
2019-06-07 14:32:58 +03:00
parent 30dea3a2e7
commit 5e3734d7bf
21 changed files with 438 additions and 501 deletions

View File

@@ -163,8 +163,16 @@ public:
Text phoneText;
TimeId onlineTill = 0;
enum class ContactStatus : char {
Unknown,
Contact,
NotContact,
};
[[nodiscard]] ContactStatus contactStatus() const {
return _contactStatus;
}
[[nodiscard]] bool isContact() const {
return _isContact;
return (contactStatus() == ContactStatus::Contact);
}
void setIsContact(bool is);
@@ -179,7 +187,7 @@ public:
bool isBlocked() const {
return (blockStatus() == BlockStatus::Blocked);
}
void setBlockStatus(BlockStatus blockStatus);
void setIsBlocked(bool is);
enum class CallsStatus : char {
Unknown,
@@ -209,7 +217,7 @@ private:
QString _unavailableReason;
QString _phone;
bool _isContact = false;
ContactStatus _contactStatus = ContactStatus::Unknown;
BlockStatus _blockStatus = BlockStatus::Unknown;
CallsStatus _callsStatus = CallsStatus::Unknown;
int _commonChatsCount = 0;