From bdf67645bb0daac3dabb09a50a7ec88f814bc7b1 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Tue, 2 Jan 2024 13:40:21 +0300 Subject: [PATCH] Improved phrase of terms in gifts box from settings. --- Telegram/Resources/langs/lang.strings | 2 ++ Telegram/SourceFiles/boxes/gift_premium_box.cpp | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 26ef1de59..9d0707518 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -2087,6 +2087,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_premium_gifts_about_paid_below#one" = "They now have access to additional features."; "lng_premium_gifts_about_paid_below#other" = "They now have access to additional features."; "lng_premium_gifts_summary_subtitle" = "What's Included"; +"lng_premium_gifts_terms" = "By gifting Telegram Premium, you agree to the Telegram {link} and {policy}."; +"lng_premium_gifts_terms_policy" = "Privacy Policy"; "lng_boost_channel_button" = "Boost Channel"; "lng_boost_again_button" = "Boost Again"; diff --git a/Telegram/SourceFiles/boxes/gift_premium_box.cpp b/Telegram/SourceFiles/boxes/gift_premium_box.cpp index 61be013b3..f7b2e2d43 100644 --- a/Telegram/SourceFiles/boxes/gift_premium_box.cpp +++ b/Telegram/SourceFiles/boxes/gift_premium_box.cpp @@ -603,7 +603,20 @@ void GiftsBox( box, object_ptr( box, - session->api().premium().statusTextValue(), // TODO. + tr::lng_premium_gifts_terms( + lt_link, + tr::lng_payments_terms_link( + ) | rpl::map([](const QString &t) { + using namespace Ui::Text; + return Link(t, u"https://telegram.org/tos"_q); + }), + lt_policy, + tr::lng_premium_gifts_terms_policy( + ) | rpl::map([](const QString &t) { + using namespace Ui::Text; + return Link(t, u"https://telegram.org/privacy"_q); + }), + Ui::Text::RichLangValue), st::premiumGiftTerms), st::defaultBoxDividerLabelPadding), {});