2021-01-19 10:56:01 +00:00
|
|
|
/*
|
|
|
|
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
|
|
|
|
|
|
|
|
#include "ui/layers/generic_box.h"
|
|
|
|
|
|
|
|
class PeerData;
|
|
|
|
|
|
|
|
namespace Api {
|
|
|
|
struct InviteLink;
|
|
|
|
} // namespace Api
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class VerticalLayout;
|
|
|
|
} // namespace Ui
|
|
|
|
|
2021-02-08 15:04:21 +00:00
|
|
|
[[nodiscard]] bool IsExpiredLink(const Api::InviteLink &data, TimeId now);
|
|
|
|
|
2021-02-05 17:35:29 +00:00
|
|
|
void AddSinglePeerRow(
|
|
|
|
not_null<Ui::VerticalLayout*> container,
|
|
|
|
not_null<PeerData*> peer,
|
|
|
|
rpl::producer<QString> status);
|
|
|
|
|
2021-01-19 10:56:01 +00:00
|
|
|
void AddPermanentLinkBlock(
|
|
|
|
not_null<Ui::VerticalLayout*> container,
|
2021-02-05 13:22:02 +00:00
|
|
|
not_null<PeerData*> peer,
|
|
|
|
not_null<UserData*> admin,
|
|
|
|
rpl::producer<Api::InviteLink> fromList);
|
2021-01-19 10:56:01 +00:00
|
|
|
|
|
|
|
void CopyInviteLink(const QString &link);
|
|
|
|
void ShareInviteLinkBox(not_null<PeerData*> peer, const QString &link);
|
2021-02-05 13:22:02 +00:00
|
|
|
void RevokeLink(
|
|
|
|
not_null<PeerData*> peer,
|
|
|
|
not_null<UserData*> admin,
|
|
|
|
const QString &link);
|
2021-02-08 15:04:21 +00:00
|
|
|
void EditLink(
|
|
|
|
not_null<PeerData*> peer,
|
|
|
|
const Api::InviteLink &data);
|
2021-01-19 10:56:01 +00:00
|
|
|
|
|
|
|
void ShowInviteLinkBox(
|
|
|
|
not_null<PeerData*> peer,
|
|
|
|
const Api::InviteLink &link);
|