mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Ask for premium to wear a collectible.
This commit is contained in:
parent
961d283325
commit
a53cc52241
1 changed files with 11 additions and 8 deletions
|
@ -16,6 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "boxes/filters/edit_filter_chats_list.h"
|
#include "boxes/filters/edit_filter_chats_list.h"
|
||||||
#include "boxes/gift_premium_box.h"
|
#include "boxes/gift_premium_box.h"
|
||||||
#include "boxes/peer_list_controllers.h"
|
#include "boxes/peer_list_controllers.h"
|
||||||
|
#include "boxes/premium_preview_box.h"
|
||||||
#include "boxes/send_credits_box.h"
|
#include "boxes/send_credits_box.h"
|
||||||
#include "chat_helpers/emoji_suggestions_widget.h"
|
#include "chat_helpers/emoji_suggestions_widget.h"
|
||||||
#include "chat_helpers/message_field.h"
|
#include "chat_helpers/message_field.h"
|
||||||
|
@ -2272,10 +2273,7 @@ void ShowUniqueGiftWearBox(
|
||||||
content,
|
content,
|
||||||
tr::lng_gift_wear_about(),
|
tr::lng_gift_wear_about(),
|
||||||
st::uniqueGiftSubtitle),
|
st::uniqueGiftSubtitle),
|
||||||
st::settingsPremiumRowTitlePadding);
|
st::settingsPremiumRowAboutPadding);
|
||||||
//"lng_gift_wear_title" = "Wear {name}";
|
|
||||||
//"lng_gift_wear_about" = "and get these benefits:";
|
|
||||||
|
|
||||||
infoRow(
|
infoRow(
|
||||||
tr::lng_gift_wear_badge_title(),
|
tr::lng_gift_wear_badge_title(),
|
||||||
tr::lng_gift_wear_badge_about(),
|
tr::lng_gift_wear_badge_about(),
|
||||||
|
@ -2292,10 +2290,15 @@ void ShowUniqueGiftWearBox(
|
||||||
box->setStyle(st::upgradeGiftBox);
|
box->setStyle(st::upgradeGiftBox);
|
||||||
|
|
||||||
const auto button = box->addButton(tr::lng_gift_wear_start(), [=] {
|
const auto button = box->addButton(tr::lng_gift_wear_start(), [=] {
|
||||||
box->closeBox();
|
const auto session = &show->session();
|
||||||
show->session().data().emojiStatuses().set(
|
if (session->premium()) {
|
||||||
show->session().user(),
|
box->closeBox();
|
||||||
show->session().data().emojiStatuses().fromUniqueGift(gift));
|
session->data().emojiStatuses().set(
|
||||||
|
session->user(),
|
||||||
|
session->data().emojiStatuses().fromUniqueGift(gift));
|
||||||
|
} else {
|
||||||
|
ShowPremiumPreviewBox(show, PremiumFeature::EmojiStatus);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
rpl::combine(
|
rpl::combine(
|
||||||
box->widthValue(),
|
box->widthValue(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue