ZaStoGram_desktop/Telegram/SourceFiles/boxes/username_box.h
John Preston b004476dc4 Share own QR links and free codes without a username
Task: 2026/10/17/open-ones-own-qr-box-without-a-username-with-temporary-only-codes
2026-10-20 17:07:54 +04:00

37 lines
781 B
C++

/*
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
namespace Ui {
class GenericBox;
class VerticalLayout;
} // namespace Ui
class PeerData;
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);