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