2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Implement adaptive ContactStatus buttons.

This commit is contained in:
John Preston
2019-06-10 14:50:21 +02:00
parent 5e3734d7bf
commit 984f19b1e9
8 changed files with 160 additions and 33 deletions

View File

@@ -103,6 +103,9 @@ private:
};
class PeerData {
private:
static constexpr auto kSettingsUnknown = MTPDpeerSettings::Flag(1U << 9);
protected:
PeerData(not_null<Data::Session*> owner, PeerId id);
PeerData(const PeerData &other) = delete;
@@ -113,7 +116,8 @@ public:
| MTPDpeerSettings::Flag::f_report_spam
| MTPDpeerSettings::Flag::f_add_contact
| MTPDpeerSettings::Flag::f_block_contact
| MTPDpeerSettings::Flag::f_share_contact;
| MTPDpeerSettings::Flag::f_share_contact
| kSettingsUnknown;
using Settings = Data::Flags<
MTPDpeerSettings::Flags,
kEssentialSettings.value()>;
@@ -365,9 +369,6 @@ private:
crl::time _lastFullUpdate = 0;
MsgId _pinnedMessageId = 0;
static constexpr auto kSettingsUnknown = MTPDpeerSettings::Flag(1U << 9);
static_assert(!(kEssentialSettings & kSettingsUnknown));
Settings _settings = { kSettingsUnknown };
QString _about;