mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
45 lines
947 B
C++
45 lines
947 B
C++
/*
|
|
This file is part of Telegram Desktop,
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
For license and copyright information please follow this link:
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
*/
|
|
#pragma once
|
|
|
|
namespace Data {
|
|
|
|
class ChannelAdminChanges {
|
|
public:
|
|
ChannelAdminChanges(not_null<ChannelData*> channel);
|
|
|
|
void add(UserId userId, const QString &rank);
|
|
void remove(UserId userId);
|
|
|
|
~ChannelAdminChanges();
|
|
|
|
private:
|
|
not_null<ChannelData*> _channel;
|
|
base::flat_set<UserId> &_admins;
|
|
base::flat_set<UserId> _changes;
|
|
UserData *_oldCreator = nullptr;
|
|
|
|
};
|
|
|
|
class ChannelMemberRankChanges {
|
|
public:
|
|
ChannelMemberRankChanges(not_null<ChannelData*> channel);
|
|
|
|
void feed(UserId userId, const QString &rank);
|
|
|
|
~ChannelMemberRankChanges();
|
|
|
|
private:
|
|
not_null<ChannelData*> _channel;
|
|
base::flat_map<UserId, QString> &_memberRanks;
|
|
base::flat_set<UserId> _changes;
|
|
|
|
};
|
|
|
|
} // namespace Data
|