diff --git a/Telegram/SourceFiles/api/api_attached_stickers.cpp b/Telegram/SourceFiles/api/api_attached_stickers.cpp index 8e789d078..a100f6d95 100644 --- a/Telegram/SourceFiles/api/api_attached_stickers.cpp +++ b/Telegram/SourceFiles/api/api_attached_stickers.cpp @@ -41,7 +41,7 @@ void AttachedStickers::request( return; } else if (result.v.size() > 1) { strongController->show( - Box(strongController, result)); + Box(strongController, result.v)); return; } // Single attached sticker pack. diff --git a/Telegram/SourceFiles/boxes/stickers_box.cpp b/Telegram/SourceFiles/boxes/stickers_box.cpp index eaad3a130..f60a5f16f 100644 --- a/Telegram/SourceFiles/boxes/stickers_box.cpp +++ b/Telegram/SourceFiles/boxes/stickers_box.cpp @@ -416,7 +416,7 @@ StickersBox::StickersBox( StickersBox::StickersBox( QWidget*, not_null controller, - const MTPVector &attachedSets) + const QVector &attachedSets) : _controller(controller) , _api(&controller->session().mtp()) , _section(Section::Attached) @@ -460,8 +460,8 @@ void StickersBox::showAttachedStickers() { } } }; - for (const auto &set : _attachedSets.v) { - add(stickers->feedSetCovered(set)); + for (const auto &set : _attachedSets) { + add(stickers->feedSet(set)); } for (const auto &setId : _emojiSets) { const auto i = stickers->sets().find(setId.id); @@ -501,7 +501,7 @@ void StickersBox::getArchivedDone( auto addedSet = false; auto changedSets = false; for (const auto &data : stickers.vsets().v) { - const auto set = session().data().stickers().feedSetCovered(data); + const auto set = session().data().stickers().feedSet(data); const auto index = archived.indexOf(set->id); if (archived.isEmpty() || index != archived.size() - 1) { changedSets = true; diff --git a/Telegram/SourceFiles/boxes/stickers_box.h b/Telegram/SourceFiles/boxes/stickers_box.h index bb1c712eb..c9709b07b 100644 --- a/Telegram/SourceFiles/boxes/stickers_box.h +++ b/Telegram/SourceFiles/boxes/stickers_box.h @@ -70,7 +70,7 @@ public: StickersBox( QWidget*, not_null controller, - const MTPVector &attachedSets); + const QVector &attachedSets); StickersBox( QWidget*, not_null controller, @@ -164,7 +164,7 @@ private: Tab *_tab = nullptr; const Data::StickersType _attachedType = {}; - const MTPVector _attachedSets; + const QVector _attachedSets; const std::vector _emojiSets; ChannelData *_megagroupSet = nullptr; diff --git a/Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp b/Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp index 0d5ace1ed..f0fa241af 100644 --- a/Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp +++ b/Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp @@ -346,7 +346,7 @@ void StickersListWidget::preloadMoreOfficial() { const auto &list = data.vsets().v; _officialOffset += list.size(); for (int i = 0, l = list.size(); i != l; ++i) { - const auto set = session().data().stickers().feedSetCovered( + const auto set = session().data().stickers().feedSet( list[i]); if (set->stickers.empty() && set->covers.empty()) { continue; @@ -763,7 +763,7 @@ void StickersListWidget::searchResultsDone( } auto &d = result.c_messages_foundStickerSets(); for (const auto &data : d.vsets().v) { - const auto set = session().data().stickers().feedSetCovered(data); + const auto set = session().data().stickers().feedSet(data); if (set->stickers.empty() && set->covers.empty()) { continue; } diff --git a/Telegram/SourceFiles/data/stickers/data_stickers.cpp b/Telegram/SourceFiles/data/stickers/data_stickers.cpp index eb455c5de..fe3fd2f45 100644 --- a/Telegram/SourceFiles/data/stickers/data_stickers.cpp +++ b/Telegram/SourceFiles/data/stickers/data_stickers.cpp @@ -364,7 +364,7 @@ void Stickers::applyArchivedResult( auto masksCount = 0; auto stickersCount = 0; for (const auto &data : v) { - const auto set = feedSetCovered(data); + const auto set = feedSet(data); if (set->flags & SetFlag::NotLoaded) { setsToRequest.insert(set->id, set->accessHash); } @@ -1454,7 +1454,7 @@ not_null Stickers::feedSetFull( return set; } -not_null Stickers::feedSetCovered( +not_null Stickers::feedSet( const MTPStickerSetCovered &data) { const auto set = data.match([&](const auto &data) { return feedSet(data.vset()); diff --git a/Telegram/SourceFiles/data/stickers/data_stickers.h b/Telegram/SourceFiles/data/stickers/data_stickers.h index 755bc9601..fde6877b9 100644 --- a/Telegram/SourceFiles/data/stickers/data_stickers.h +++ b/Telegram/SourceFiles/data/stickers/data_stickers.h @@ -237,8 +237,8 @@ public: not_null document); not_null feedSet(const MTPStickerSet &data); + not_null feedSet(const MTPStickerSetCovered &data); not_null feedSetFull(const MTPDmessages_stickerSet &data); - not_null feedSetCovered(const MTPStickerSetCovered &data); void feedSetStickers( not_null set, const QVector &documents,