Fixed display of "Show more" button in channel currency earn list.

This commit is contained in:
23rd
2025-08-25 09:59:41 +03:00
parent b15305bc69
commit 1420714cae
@@ -1063,7 +1063,8 @@ void InnerWidget::fill() {
if (hasCurrencyTab) {
Ui::AddSkip(listsContainer);
const auto historyList = tabCurrencyList->entity();
const auto historyList = tabCurrencyList->entity()->add(
object_ptr<Ui::VerticalLayout>(tabCurrencyList->entity()));
const auto addHistoryEntry = [=](
const Data::CreditsHistoryEntry &entry,
const tr::phrase<> &text) {
@@ -1312,22 +1313,17 @@ void InnerWidget::fill() {
state->token = firstSlice.token;
state->showed = firstSlice.list.size();
const auto max = firstSlice.total;
const auto wrap = listsContainer->add(
const auto wrap = tabCurrencyList->entity()->add(
object_ptr<Ui::SlideWrap<Ui::SettingsButton>>(
listsContainer,
tabCurrencyList->entity(),
object_ptr<Ui::SettingsButton>(
listsContainer,
tr::lng_channel_earn_history_show_more(
lt_count,
state->showed.value(
) | rpl::map(
max - rpl::mappers::_1
) | tr::to_count()),
tabCurrencyList->entity(),
tr::lng_channels_your_more(),
st::statisticsShowMoreButton)));
const auto button = wrap->entity();
Ui::AddToggleUpDownArrowToMoreButton(button);
wrap->toggle(true, anim::type::instant);
wrap->toggle(!firstSlice.allLoaded, anim::type::instant);
const auto handleReceived = [=](
Data::EarnHistorySlice slice) {
state->loading = false;