2014-10-22 22:39:03 +04:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 13:23:14 +03:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2014-10-22 22:39:03 +04:00
|
|
|
|
2018-01-03 13:23:14 +03:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2014-10-22 22:39:03 +04:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2016-11-11 16:46:04 +03:00
|
|
|
namespace Ui {
|
2022-10-11 21:10:15 +03:00
|
|
|
class GenericBox;
|
2022-11-27 15:32:13 +03:00
|
|
|
class VerticalLayout;
|
2016-11-11 16:46:04 +03:00
|
|
|
} // namespace Ui
|
|
|
|
|
2023-04-09 23:25:18 +03:00
|
|
|
class PeerData;
|
2019-08-06 17:40:08 +01:00
|
|
|
|
2022-10-11 21:10:15 +03:00
|
|
|
void UsernamesBox(
|
|
|
|
not_null<Ui::GenericBox*> box,
|
2023-04-09 23:25:18 +03:00
|
|
|
not_null<PeerData*> peer);
|
2022-11-27 15:32:13 +03:00
|
|
|
|
|
|
|
struct UsernameCheckInfo final {
|
2024-01-29 23:28:04 +03:00
|
|
|
[[nodiscard]] static UsernameCheckInfo PurchaseAvailable(
|
|
|
|
const QString &username,
|
|
|
|
not_null<PeerData*> peer);
|
|
|
|
|
2022-11-27 15:32:13 +03:00
|
|
|
enum class Type {
|
|
|
|
Good,
|
|
|
|
Error,
|
|
|
|
Default,
|
|
|
|
};
|
|
|
|
Type type;
|
|
|
|
TextWithEntities text;
|
|
|
|
};
|
|
|
|
|
|
|
|
void AddUsernameCheckLabel(
|
|
|
|
not_null<Ui::VerticalLayout*> container,
|
|
|
|
rpl::producer<UsernameCheckInfo> checkInfo);
|