2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Implement collectible username / phone info boxes.

This commit is contained in:
John Preston
2024-04-02 15:35:53 +04:00
parent 22f504ca21
commit 1061fb6c85
40 changed files with 630 additions and 75 deletions

View File

@@ -150,15 +150,11 @@ public:
// a full check by canShareThisContact() call.
[[nodiscard]] bool canShareThisContactFast() const;
MTPInputUser inputUser = MTP_inputUserEmpty();
QString firstName;
QString lastName;
[[nodiscard]] const QString &phone() const;
[[nodiscard]] QString username() const;
[[nodiscard]] QString editableUsername() const;
[[nodiscard]] const std::vector<QString> &usernames() const;
QString nameOrPhone;
[[nodiscard]] bool isUsernameEditable(QString username) const;
enum class ContactStatus : char {
Unknown,
@@ -186,8 +182,6 @@ public:
void setBirthday(Data::Birthday value);
void setBirthday(const tl::conditional<MTPBirthday> &value);
std::unique_ptr<BotInfo> botInfo;
void setUnavailableReasons(
std::vector<Data::UnavailableReason> &&reasons);
@@ -209,6 +203,14 @@ public:
[[nodiscard]] MsgId personalChannelMessageId() const;
void setPersonalChannel(ChannelId channelId, MsgId messageId);
MTPInputUser inputUser = MTP_inputUserEmpty();
QString firstName;
QString lastName;
QString nameOrPhone;
std::unique_ptr<BotInfo> botInfo;
private:
auto unavailableReasons() const
-> const std::vector<Data::UnavailableReason> & override;