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;
|
|
|
|
|
2023-05-18 13:46:24 +00:00
|
|
|
namespace ChatHelpers {
|
|
|
|
class Show;
|
|
|
|
} // namespace ChatHelpers
|
|
|
|
|
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(
|
2023-05-26 16:30:02 +00:00
|
|
|
std::shared_ptr<ChatHelpers::Show> show,
|
2022-05-18 10:18:17 +00:00
|
|
|
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,
|
2023-01-30 10:10:42 +00:00
|
|
|
RealTimeTranslation,
|
2022-06-10 08:03:47 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
2023-05-18 13:46:24 +00:00
|
|
|
void ShowPremiumPreviewBox(
|
|
|
|
std::shared_ptr<ChatHelpers::Show> show,
|
|
|
|
PremiumPreview section,
|
|
|
|
Fn<void(not_null<Ui::BoxContent*>)> shown = nullptr);
|
|
|
|
|
2022-06-14 09:42:43 +00:00
|
|
|
void ShowPremiumPreviewToBuy(
|
|
|
|
not_null<Window::SessionController*> controller,
|
|
|
|
PremiumPreview section,
|
2023-01-30 14:01:10 +00:00
|
|
|
Fn<void()> hiddenCallback = nullptr);
|
2022-06-14 09:42:43 +00:00
|
|
|
|
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);
|