From 7e5d5ddafe78738052f65a32bebc97f65b07af20 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 5 Nov 2025 19:45:54 +0300 Subject: [PATCH] Added top senders badge only they are present to paid reactions box. --- .../payments/ui/payments_reaction_box.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/payments/ui/payments_reaction_box.cpp b/Telegram/SourceFiles/payments/ui/payments_reaction_box.cpp index fec842b372..9063f2a24e 100644 --- a/Telegram/SourceFiles/payments/ui/payments_reaction_box.cpp +++ b/Telegram/SourceFiles/payments/ui/payments_reaction_box.cpp @@ -290,12 +290,14 @@ void FillTopReactors( rpl::producer chosen, rpl::producer shownPeer, Fn changeShownPeer) { - container->add( - MakeBoostFeaturesBadge( + const auto badge = container->add( + object_ptr>( container, - tr::lng_paid_react_top_title(), - [](QRect) { return st::creditsBg3->b; }), - st::boxRowPadding + st::paidReactTopTitleMargin, + MakeBoostFeaturesBadge( + container, + tr::lng_paid_react_top_title(), + [](QRect) { return st::creditsBg3->b; }), + st::boxRowPadding + st::paidReactTopTitleMargin), style::al_top); const auto height = st::paidReactTopNameSkip + st::normalFont->height; @@ -359,8 +361,10 @@ void FillTopReactors( barePeerId, changeShownPeer); }; if (list.empty()) { + badge->hide(anim::type::normal); wrap->hide(anim::type::normal); } else { + badge->show(anim::type::normal); for (const auto &widget : state->widgets) { widget->hide(); } @@ -388,6 +392,7 @@ void FillTopReactors( state->updated.fire({}); }, wrap->lifetime()); + badge->finishAnimating(); wrap->finishAnimating(); rpl::combine(