mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-26 23:43:06 +02:00
Guarded requests of recent gifts for button from shared media section.
This commit is contained in:
parent
71f3a1f7cf
commit
7253d764d2
1 changed files with 2 additions and 1 deletions
|
@ -365,7 +365,7 @@ not_null<Ui::SettingsButton*> AddPeerGiftsButton(
|
|||
wrap->toggleOn(rpl::duplicate(forked) | rpl::map(rpl::mappers::_1 > 0));
|
||||
tracker.track(wrap);
|
||||
|
||||
navigation->session().recentSharedGifts().request(peer, [=](
|
||||
const auto requestDone = crl::guard(wrap, [=](
|
||||
std::vector<DocumentId> ids) {
|
||||
state->emojiList.clear();
|
||||
for (const auto &id : ids) {
|
||||
|
@ -374,6 +374,7 @@ not_null<Ui::SettingsButton*> AddPeerGiftsButton(
|
|||
}
|
||||
state->textRefreshed.fire({});
|
||||
});
|
||||
navigation->session().recentSharedGifts().request(peer, requestDone);
|
||||
|
||||
state->button = wrap->entity();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue