Added top senders badge only they are present to paid reactions box.

This commit is contained in:
23rd
2025-11-05 19:45:54 +03:00
parent 150c25c81a
commit 7e5d5ddafe
@@ -290,12 +290,14 @@ void FillTopReactors(
rpl::producer<int> chosen,
rpl::producer<uint64> shownPeer,
Fn<void(uint64)> changeShownPeer) {
container->add(
MakeBoostFeaturesBadge(
const auto badge = container->add(
object_ptr<SlideWrap<RpWidget>>(
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(