From db8338156a1d7d872a787f1a74dfa72e7309de5b Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 18 Dec 2023 03:16:38 +0300 Subject: [PATCH] Slightly improved style of terms label in gift box from settings. --- .../SourceFiles/boxes/gift_premium_box.cpp | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/Telegram/SourceFiles/boxes/gift_premium_box.cpp b/Telegram/SourceFiles/boxes/gift_premium_box.cpp index a5847028e0..f2d004d64a 100644 --- a/Telegram/SourceFiles/boxes/gift_premium_box.cpp +++ b/Telegram/SourceFiles/boxes/gift_premium_box.cpp @@ -531,24 +531,17 @@ void GiftsBox( } // Footer. - auto terms = object_ptr( - box, - tr::lng_premium_gift_terms( - lt_link, - tr::lng_premium_gift_terms_link( - ) | rpl::map([=](const QString &t) { - return Ui::Text::Link(t, 1); - }), - Ui::Text::WithEntities), - st::premiumGiftTerms); - terms->setLink(1, std::make_shared([=] { - box->closeBox(); - Settings::ShowPremium(session, QString()); - })); - terms->resizeToWidth(available); - box->addRow( - object_ptr>(box, std::move(terms)), - st::premiumGiftTermsPadding); + { + box->addRow( + object_ptr( + box, + object_ptr( + box, + session->api().premium().statusTextValue(), // TODO. + st::premiumGiftTerms), + st::defaultBoxDividerLabelPadding), + {}); + } // Button. const auto &stButton = st::premiumGiftBox;