mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Show premium page on limit increase decision.
This commit is contained in:
@@ -1082,7 +1082,7 @@ premiumBubblePadding: margins(14px, 0px, 14px, 0px);
|
||||
premiumBubbleHeight: 40px;
|
||||
premiumBubbleSkip: 5px;
|
||||
premiumBubbleTextSkip: 3px;
|
||||
premiumBubbleSlideDuration: 500;
|
||||
premiumBubbleSlideDuration: 1000;
|
||||
premiumBubbleTailSize: size(21px, 7px);
|
||||
premiumBubbleFont: font(19px);
|
||||
premiumLineTextSkip: 11px;
|
||||
|
@@ -25,6 +25,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "data/data_session.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "settings/settings_common.h"
|
||||
#include "settings/settings_premium.h"
|
||||
#include "base/unixtime.h"
|
||||
#include "apiwrap.h"
|
||||
#include "styles/style_boxes.h"
|
||||
@@ -432,9 +433,7 @@ void SimpleLimitBox(
|
||||
});
|
||||
} else {
|
||||
box->addButton(tr::lng_limits_increase(), [=] {
|
||||
Ui::ShowMultilineToast({
|
||||
.text = { u"Premium!"_q },
|
||||
});
|
||||
Settings::ShowPremium(session);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -565,9 +564,7 @@ void ChannelsLimitBox(
|
||||
});
|
||||
} else {
|
||||
box->addButton(tr::lng_limits_increase(), [=] {
|
||||
Ui::ShowMultilineToast({
|
||||
.text = { u"Premium!"_q },
|
||||
});
|
||||
Settings::ShowPremium(session);
|
||||
});
|
||||
}
|
||||
}, box->lifetime());
|
||||
|
@@ -22,6 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "lottie/lottie_icon.h"
|
||||
#include "main/main_session.h"
|
||||
#include "settings/settings_common.h"
|
||||
#include "settings/settings_premium.h"
|
||||
#include "ui/chat/chat_style.h"
|
||||
#include "ui/chat/chat_theme.h"
|
||||
#include "ui/effects/scroll_content_shadow.h"
|
||||
@@ -447,9 +448,7 @@ void ReactionsSettingsBox(
|
||||
|
||||
button->setClickedCallback([=, emoji = r.emoji] {
|
||||
if (premium && !controller->session().user()->isPremium()) {
|
||||
Ui::ShowMultilineToast({
|
||||
.text = { u"Premium reaction."_q },
|
||||
});
|
||||
Settings::ShowPremium(&controller->session());
|
||||
return;
|
||||
}
|
||||
checkButton(button);
|
||||
|
@@ -19,6 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "ui/widgets/buttons.h"
|
||||
#include "ui/widgets/gradient_round_button.h"
|
||||
#include "ui/wrap/padding_wrap.h"
|
||||
#include "settings/settings_premium.h"
|
||||
#include "lottie/lottie_single_player.h"
|
||||
#include "history/view/media/history_view_sticker.h"
|
||||
#include "window/window_session_controller.h"
|
||||
@@ -204,7 +205,7 @@ void StickerBox(
|
||||
const auto width = size - buttonPadding.left() - buttonPadding.right();
|
||||
auto button = CreateUnlockButton(box, width);
|
||||
button->setClickedCallback([=] {
|
||||
controller->showSettings();
|
||||
controller->showSettings(Settings::PremiumId());
|
||||
});
|
||||
box->addButton(std::move(button));
|
||||
}
|
||||
|
Reference in New Issue
Block a user