2017-09-26 17:57:01 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2017-09-26 17:57:01 +00:00
|
|
|
|
2018-01-03 10:23:14 +00:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2017-09-26 17:57:01 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2022-03-29 16:43:33 +00:00
|
|
|
#include "boxes/peer_list_controllers.h"
|
2022-08-11 17:22:21 +00:00
|
|
|
#include "ui/unread_badge.h"
|
2017-09-26 17:57:01 +00:00
|
|
|
|
2022-12-23 13:13:32 +00:00
|
|
|
class ParticipantsBoxController;
|
|
|
|
|
2017-10-03 13:05:58 +00:00
|
|
|
namespace Window {
|
2019-06-06 10:21:40 +00:00
|
|
|
class SessionNavigation;
|
2017-10-03 13:05:58 +00:00
|
|
|
} // namespace Window
|
|
|
|
|
2017-09-26 17:57:01 +00:00
|
|
|
namespace Info {
|
|
|
|
namespace Profile {
|
|
|
|
|
2022-03-29 16:43:33 +00:00
|
|
|
class MemberListRow final : public PeerListRowWithLink {
|
2017-11-07 17:53:00 +00:00
|
|
|
public:
|
|
|
|
enum class Rights {
|
|
|
|
Normal,
|
|
|
|
Admin,
|
|
|
|
Creator,
|
|
|
|
};
|
|
|
|
struct Type {
|
|
|
|
Rights rights;
|
2022-03-29 16:43:33 +00:00
|
|
|
QString adminRank;
|
2017-11-07 17:53:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
MemberListRow(not_null<UserData*> user, Type type);
|
|
|
|
|
|
|
|
void setType(Type type);
|
2022-03-29 16:43:33 +00:00
|
|
|
bool rightActionDisabled() const override;
|
|
|
|
QMargins rightActionMargins() const override;
|
2020-04-30 15:31:44 +00:00
|
|
|
void refreshStatus() override;
|
2017-11-07 17:53:00 +00:00
|
|
|
|
2019-01-04 11:09:48 +00:00
|
|
|
not_null<UserData*> user() const;
|
2017-11-07 17:53:00 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Type _type;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2022-12-23 13:13:32 +00:00
|
|
|
std::unique_ptr<ParticipantsBoxController> CreateMembersController(
|
2019-06-06 10:21:40 +00:00
|
|
|
not_null<Window::SessionNavigation*> navigation,
|
2017-09-26 17:57:01 +00:00
|
|
|
not_null<PeerData*> peer);
|
|
|
|
|
|
|
|
} // namespace Profile
|
|
|
|
} // namespace Info
|