From 55ba6553a0c21d558bc521e5bcd8148ee35439a6 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 13 Nov 2023 17:33:55 +0400 Subject: [PATCH] wip giveaway --- .../SourceFiles/history/view/media/history_view_giveaway.cpp | 3 +++ .../SourceFiles/history/view/media/history_view_giveaway.h | 1 + 2 files changed, 4 insertions(+) diff --git a/Telegram/SourceFiles/history/view/media/history_view_giveaway.cpp b/Telegram/SourceFiles/history/view/media/history_view_giveaway.cpp index f65613ea3fff5a..e4a9f7f96f131f 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_giveaway.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_giveaway.cpp @@ -400,9 +400,12 @@ void Giveaway::ensureStickerCreated() const { if (_sticker) { return; } +#if 0 // mtp const auto &session = _parent->history()->session(); auto &packs = session.giftBoxStickersPacks(); if (const auto document = packs.lookup(_months)) { +#endif + if (const auto document = _document) { if (const auto sticker = document->sticker()) { const auto skipPremiumEffect = false; _sticker.emplace(_parent, document, skipPremiumEffect, _parent); diff --git a/Telegram/SourceFiles/history/view/media/history_view_giveaway.h b/Telegram/SourceFiles/history/view/media/history_view_giveaway.h index 250e214c299abd..c15a852a4e0b32 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_giveaway.h +++ b/Telegram/SourceFiles/history/view/media/history_view_giveaway.h @@ -86,6 +86,7 @@ class Giveaway final : public Media { [[nodiscard]] QMargins inBubblePadding() const; + DocumentData *_document = nullptr; mutable std::optional _sticker; Ui::Text::String _prizesTitle;