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

Respect correct min-level for colors.

This commit is contained in:
John Preston
2023-12-20 23:02:54 -04:00
parent d5a1c354d0
commit 9201cf24f1
12 changed files with 106 additions and 13 deletions

View File

@@ -949,6 +949,14 @@ void ChannelData::processTopics(const MTPVector<MTPForumTopic> &topics) {
}
}
int ChannelData::levelHint() const {
return _levelHint;
}
void ChannelData::updateLevelHint(int levelHint) {
_levelHint = levelHint;
}
namespace Data {
void ApplyMigration(

View File

@@ -463,6 +463,9 @@ public:
void processTopics(const MTPVector<MTPForumTopic> &topics);
[[nodiscard]] int levelHint() const;
void updateLevelHint(int levelHint);
// Still public data members.
uint64 access = 0;
@@ -497,6 +500,7 @@ private:
int _restrictedCount = 0;
int _kickedCount = 0;
int _pendingRequestsCount = 0;
int _levelHint = 0;
std::vector<UserId> _recentRequesters;
MsgId _availableMinId = 0;

View File

@@ -845,6 +845,7 @@ not_null<PeerData*> Session::processChat(const MTPChat &data) {
const auto wasCallNotEmpty = Data::ChannelHasActiveCall(channel);
channel->updateLevelHint(data.vlevel().value_or_empty());
if (const auto count = data.vparticipants_count()) {
channel->setMembersCount(count->v);
}