2022-05-18 10:18:17 +00: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
|
|
|
|
|
2022-07-18 14:15:27 +00:00
|
|
|
#include "base/object_ptr.h"
|
|
|
|
|
2022-05-18 10:18:17 +00:00
|
|
|
class DocumentData;
|
|
|
|
|
2022-08-16 11:28:17 +00:00
|
|
|
namespace Data {
|
|
|
|
struct ReactionId;
|
|
|
|
} // namespace Data
|
|
|
|
|
2022-06-08 07:26:53 +00:00
|
|
|
namespace Ui {
|
2022-07-22 17:37:12 +00:00
|
|
|
class BoxContent;
|
2022-06-08 07:26:53 +00:00
|
|
|
class GenericBox;
|
2022-07-18 14:15:27 +00:00
|
|
|
class GradientButton;
|
2022-06-08 07:26:53 +00:00
|
|
|
} // namespace Ui
|
|
|
|
|
2022-05-18 10:18:17 +00:00
|
|
|
namespace Window {
|
|
|
|
class SessionController;
|
|
|
|
} // namespace Window
|
|
|
|
|
2022-06-13 11:27:20 +00:00
|
|
|
namespace Main {
|
|
|
|
class Session;
|
|
|
|
} // namespace Main
|
|
|
|
|
2022-05-18 10:18:17 +00:00
|
|
|
void ShowStickerPreviewBox(
|
|
|
|
not_null<Window::SessionController*> controller,
|
|
|
|
not_null<DocumentData*> document);
|
2022-05-27 15:42:05 +00:00
|
|
|
|
2022-06-13 11:27:20 +00:00
|
|
|
void DoubledLimitsPreviewBox(
|
|
|
|
not_null<Ui::GenericBox*> box,
|
|
|
|
not_null<Main::Session*> session);
|
|
|
|
|
2022-05-27 15:42:05 +00:00
|
|
|
enum class PremiumPreview {
|
2022-06-10 08:03:47 +00:00
|
|
|
MoreUpload,
|
|
|
|
FasterDownload,
|
|
|
|
VoiceToText,
|
|
|
|
NoAds,
|
2022-09-06 16:53:42 +00:00
|
|
|
EmojiStatus,
|
|
|
|
InfiniteReactions,
|
2022-05-27 15:42:05 +00:00
|
|
|
Stickers,
|
2022-07-15 09:45:44 +00:00
|
|
|
AnimatedEmoji,
|
2022-06-10 08:03:47 +00:00
|
|
|
AdvancedChatManagement,
|
|
|
|
ProfileBadge,
|
|
|
|
AnimatedUserpics,
|
|
|
|
|
|
|
|
kCount,
|
2022-05-27 15:42:05 +00:00
|
|
|
};
|
2022-08-16 11:28:17 +00:00
|
|
|
|
|
|
|
void ShowPremiumPreviewBox(
|
|
|
|
not_null<Window::SessionController*> controller,
|
|
|
|
PremiumPreview section,
|
2022-07-22 17:37:12 +00:00
|
|
|
Fn<void(not_null<Ui::BoxContent*>)> shown = nullptr);
|
2022-06-08 07:26:53 +00:00
|
|
|
|
2022-06-14 09:42:43 +00:00
|
|
|
void ShowPremiumPreviewToBuy(
|
|
|
|
not_null<Window::SessionController*> controller,
|
|
|
|
PremiumPreview section,
|
|
|
|
Fn<void()> hiddenCallback);
|
|
|
|
|
2022-06-08 07:26:53 +00:00
|
|
|
void PremiumUnavailableBox(not_null<Ui::GenericBox*> box);
|
2022-07-18 14:15:27 +00:00
|
|
|
|
|
|
|
[[nodiscard]] object_ptr<Ui::GradientButton> CreateUnlockButton(
|
|
|
|
QWidget *parent,
|
|
|
|
rpl::producer<QString> text);
|