mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Fixed display of "Show more" button in channel currency earn list.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user