2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Saving featured stickers for new 0.9.57 version in local storage.

This commit is contained in:
John Preston
2016-06-27 19:25:21 +03:00
parent a89185565a
commit 991c6ddd99
24 changed files with 578 additions and 120 deletions

View File

@@ -929,7 +929,7 @@ void ApiWrap::gotStickerSet(uint64 setId, const MTPmessages_StickerSet &result)
if (d.vset.type() != mtpc_stickerSet) return;
const auto &s(d.vset.c_stickerSet());
Stickers::Sets &sets(Global::RefStickerSets());
auto &sets = Global::RefStickerSets();
auto it = sets.find(setId);
if (it == sets.cend()) return;
@@ -937,7 +937,9 @@ void ApiWrap::gotStickerSet(uint64 setId, const MTPmessages_StickerSet &result)
it->hash = s.vhash.v;
it->shortName = qs(s.vshort_name);
it->title = stickerSetTitle(s);
it->flags = s.vflags.v;
auto clientFlags = it->flags & (MTPDstickerSet_ClientFlag::f_featured | MTPDstickerSet_ClientFlag::f_not_loaded);
it->flags = s.vflags.v | clientFlags;
it->flags &= ~MTPDstickerSet_ClientFlag::f_not_loaded;
const auto &d_docs(d.vdocuments.c_vector().v);
auto custom = sets.find(Stickers::CustomSetId);