From ec82d5674f984b9c5bd6065d57b241cda67f138e Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Tue, 14 Jan 2025 19:53:57 +0300 Subject: [PATCH] Slightly improved style of section for boost statistics. --- Telegram/Resources/langs/lang.strings | 1 + .../boosts/info_boosts_inner_widget.cpp | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 3bde59247..d9bc0f3ff 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -5836,6 +5836,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_boosts_list_tab_gifts#other" = "{count} Gifts"; "lng_boosts_prepaid_giveaway_title" = "Prepaid giveaways"; +"lng_boosts_prepaid_giveaway_title_subtext" = "Select a giveaway you already paid for to set it up."; "lng_boosts_prepaid_giveaway_single" = "Prepaid giveaway"; "lng_boosts_prepaid_giveaway_quantity#one" = "{count} Telegram Premium"; "lng_boosts_prepaid_giveaway_quantity#other" = "{count} Telegram Premium"; diff --git a/Telegram/SourceFiles/info/channel_statistics/boosts/info_boosts_inner_widget.cpp b/Telegram/SourceFiles/info/channel_statistics/boosts/info_boosts_inner_widget.cpp index 5b6648220..17215b6c5 100644 --- a/Telegram/SourceFiles/info/channel_statistics/boosts/info_boosts_inner_widget.cpp +++ b/Telegram/SourceFiles/info/channel_statistics/boosts/info_boosts_inner_widget.cpp @@ -185,7 +185,7 @@ void FillShareLink( const auto label = content->lifetime().make_state( content, - rpl::single(link), + rpl::single(base::duplicate(link).replace(u"https://"_q, QString())), nullptr); content->add( label->take(), @@ -391,7 +391,9 @@ void InnerWidget::fill() { } Ui::AddSkip(inner); - Ui::AddDivider(inner); + Ui::AddDividerText( + inner, + tr::lng_boosts_prepaid_giveaway_title_subtext()); Ui::AddSkip(inner); } @@ -456,9 +458,9 @@ void InnerWidget::fill() { inner, object_ptr( inner, - st::dialogsSearchTabs)), - st::boxRowPadding); - if (const auto shadow = Ui::CreateChild(inner)) { + st::dialogsSearchTabs))); + if (!hasOneTab) { + const auto shadow = Ui::CreateChild(inner); shadow->show(); slider->geometryValue( ) | rpl::start_with_next([=](const QRect &r) {