2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-28 21:18:46 +00:00
tdesktop/Telegram/SourceFiles/boxes/gift_premium_box.h

80 lines
2.1 KiB
C
Raw Normal View History

2022-07-03 17:56:12 +03: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 "mtproto/sender.h"
namespace Api {
struct GiftCode;
} // namespace Api
2023-10-11 13:29:02 +04:00
namespace Data {
2024-09-04 01:55:57 +03:00
struct Boost;
struct CreditsHistoryEntry;
2023-12-13 08:14:41 +00:00
struct GiveawayStart;
struct GiveawayResults;
struct SubscriptionEntry;
2023-10-11 13:29:02 +04:00
} // namespace Data
namespace Ui {
class GenericBox;
class VerticalLayout;
} // namespace Ui
2022-07-03 17:56:12 +03:00
namespace Window {
class SessionNavigation;
2022-07-03 17:56:12 +03:00
} // namespace Window
2023-10-11 13:29:02 +04:00
[[nodiscard]] rpl::producer<QString> GiftDurationValue(int months);
[[nodiscard]] QString GiftDuration(int months);
void GiftCodeBox(
not_null<Ui::GenericBox*> box,
not_null<Window::SessionNavigation*> controller,
const QString &slug);
2023-11-07 05:35:28 +03:00
void GiftCodePendingBox(
not_null<Ui::GenericBox*> box,
not_null<Window::SessionNavigation*> controller,
const Api::GiftCode &data);
void ResolveGiftCode(
not_null<Window::SessionNavigation*> controller,
const QString &slug,
PeerId fromId = 0,
PeerId toId = 0);
2023-10-11 13:29:02 +04:00
void ResolveGiveawayInfo(
not_null<Window::SessionNavigation*> controller,
2023-10-11 13:29:02 +04:00
not_null<PeerData*> peer,
MsgId messageId,
2023-12-13 08:14:41 +00:00
std::optional<Data::GiveawayStart> start,
std::optional<Data::GiveawayResults> results);
2024-09-20 12:03:44 +04:00
void AddStarGiftTable(
not_null<Window::SessionNavigation*> controller,
not_null<Ui::VerticalLayout*> container,
const Data::CreditsHistoryEntry &entry);
void AddCreditsHistoryEntryTable(
not_null<Window::SessionNavigation*> controller,
not_null<Ui::VerticalLayout*> container,
const Data::CreditsHistoryEntry &entry);
void AddSubscriptionEntryTable(
not_null<Window::SessionNavigation*> controller,
not_null<Ui::VerticalLayout*> container,
const Data::SubscriptionEntry &s);
2024-08-10 21:21:07 +03:00
void AddSubscriberEntryTable(
not_null<Window::SessionNavigation*> controller,
not_null<Ui::VerticalLayout*> container,
not_null<PeerData*> peer,
TimeId date);
2024-09-04 01:55:57 +03:00
void AddCreditsBoostTable(
not_null<Window::SessionNavigation*> controller,
not_null<Ui::VerticalLayout*> container,
const Data::Boost &boost);