mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-27 07:52:57 +02:00
Use better file origin for gift stickers.
This commit is contained in:
parent
a56d2b1313
commit
49f580a36b
1 changed files with 7 additions and 2 deletions
|
@ -1318,10 +1318,15 @@ void GenericCreditsEntryBox(
|
||||||
? e.premiumMonthsForStars
|
? e.premiumMonthsForStars
|
||||||
: packs.monthsForStars(e.credits.whole()));
|
: packs.monthsForStars(e.credits.whole()));
|
||||||
if (document && document->sticker()) {
|
if (document && document->sticker()) {
|
||||||
|
const auto origin = starGiftSticker
|
||||||
|
? starGiftSticker->stickerOrGifOrigin()
|
||||||
|
: e.credits.ton()
|
||||||
|
? packs.tonOrigin()
|
||||||
|
: packs.origin();
|
||||||
state->sticker = document;
|
state->sticker = document;
|
||||||
state->media = document->createMediaView();
|
state->media = document->createMediaView();
|
||||||
state->media->thumbnailWanted(packs.origin());
|
state->media->thumbnailWanted(origin);
|
||||||
state->media->automaticLoad(packs.origin(), nullptr);
|
state->media->automaticLoad(origin, nullptr);
|
||||||
rpl::single() | rpl::then(
|
rpl::single() | rpl::then(
|
||||||
session->downloaderTaskFinished()
|
session->downloaderTaskFinished()
|
||||||
) | rpl::filter([=] {
|
) | rpl::filter([=] {
|
||||||
|
|
Loading…
Add table
Reference in a new issue