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);
|
|
|
|
|
2023-08-04 06:07:37 +00:00
|
|
|
void UpgradedStoriesPreviewBox(
|
|
|
|
not_null<Ui::GenericBox*> box,
|
|
|
|
not_null<Main::Session*> session);
|
|
|
|
|
2024-03-29 14:53:14 +00:00
|
|
|
void TelegramBusinessPreviewBox(
|
|
|
|
not_null<Ui::GenericBox*> box,
|
|
|
|
not_null<Main::Session*> session);
|
|
|
|
|
2024-03-01 14:37:50 +00:00
|
|
|
enum class PremiumFeature {
|
|
|
|
// Premium features.
|
2023-08-04 06:07:37 +00:00
|
|
|
Stories,
|
|
|
|
DoubleLimits,
|
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,
|
2023-11-28 17:51:53 +00:00
|
|
|
Wallpapers,
|
2024-01-26 13:19:28 +00:00
|
|
|
TagsForMessages,
|
2024-02-02 13:37:41 +00:00
|
|
|
LastSeen,
|
|
|
|
MessagePrivacy,
|
2024-02-19 07:35:53 +00:00
|
|
|
Business,
|
2022-06-10 08:03:47 +00:00
|
|
|
|
2024-03-01 14:37:50 +00:00
|
|
|
// Business features.
|
|
|
|
BusinessLocation,
|
|
|
|
BusinessHours,
|
|
|
|
QuickReplies,
|
|
|
|
GreetingMessage,
|
|
|
|
AwayMessage,
|
|
|
|
BusinessBots,
|
2024-03-19 06:09:00 +00:00
|
|
|
ChatIntro,
|
2024-03-26 10:00:34 +00:00
|
|
|
ChatLinks,
|
2024-03-01 14:37:50 +00:00
|
|
|
|
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,
|
2024-03-01 14:37:50 +00:00
|
|
|
PremiumFeature 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,
|
2024-03-01 14:37:50 +00:00
|
|
|
PremiumFeature section,
|
2023-12-17 09:58:47 +00:00
|
|
|
Fn<void(not_null<Ui::BoxContent*>)> shown = nullptr,
|
|
|
|
bool hideSubscriptionButton = false);
|
2023-05-18 13:46:24 +00:00
|
|
|
|
2022-06-14 09:42:43 +00:00
|
|
|
void ShowPremiumPreviewToBuy(
|
|
|
|
not_null<Window::SessionController*> controller,
|
2024-03-01 14:37:50 +00:00
|
|
|
PremiumFeature 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);
|