2014-10-22 18:39:03 +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.
|
2014-10-22 18:39:03 +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
|
2014-10-22 18:39:03 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2016-11-11 13:46:04 +00:00
|
|
|
namespace Ui {
|
2022-10-11 18:10:15 +00:00
|
|
|
class GenericBox;
|
2022-11-27 12:32:13 +00:00
|
|
|
class VerticalLayout;
|
2016-11-11 13:46:04 +00:00
|
|
|
} // namespace Ui
|
|
|
|
|
2023-04-09 20:25:18 +00:00
|
|
|
class PeerData;
|
2019-08-06 16:40:08 +00:00
|
|
|
|
2022-10-11 18:10:15 +00:00
|
|
|
void UsernamesBox(
|
|
|
|
not_null<Ui::GenericBox*> box,
|
2023-04-09 20:25:18 +00:00
|
|
|
not_null<PeerData*> peer);
|
2022-11-27 12:32:13 +00:00
|
|
|
|
|
|
|
struct UsernameCheckInfo final {
|
2024-01-29 20:28:04 +00:00
|
|
|
[[nodiscard]] static UsernameCheckInfo PurchaseAvailable(
|
|
|
|
const QString &username,
|
|
|
|
not_null<PeerData*> peer);
|
|
|
|
|
2022-11-27 12:32:13 +00:00
|
|
|
enum class Type {
|
|
|
|
Good,
|
|
|
|
Error,
|
|
|
|
Default,
|
|
|
|
};
|
|
|
|
Type type;
|
|
|
|
TextWithEntities text;
|
|
|
|
};
|
|
|
|
|
|
|
|
void AddUsernameCheckLabel(
|
|
|
|
not_null<Ui::VerticalLayout*> container,
|
|
|
|
rpl::producer<UsernameCheckInfo> checkInfo);
|