tdesktop/Telegram/SourceFiles/boxes/username_box.h

38 lines
781 B
C
Raw Normal View History

2014-10-22 18:39:03 +00:00
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
2014-10-22 18:39:03 +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
namespace Ui {
2022-10-11 18:10:15 +00:00
class GenericBox;
class VerticalLayout;
} // namespace Ui
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,
not_null<PeerData*> peer);
struct UsernameCheckInfo final {
[[nodiscard]] static UsernameCheckInfo PurchaseAvailable(
const QString &username,
not_null<PeerData*> peer);
enum class Type {
Good,
Error,
Default,
};
Type type;
TextWithEntities text;
};
void AddUsernameCheckLabel(
not_null<Ui::VerticalLayout*> container,
rpl::producer<UsernameCheckInfo> checkInfo);