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