2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Featured stickers fully supported (unread badges, box, adding, etc).

This commit is contained in:
John Preston
2016-06-28 21:05:38 +03:00
parent 991c6ddd99
commit cd696ade4e
24 changed files with 656 additions and 304 deletions

View File

@@ -924,10 +924,10 @@ void ApiWrap::gotStickerSet(uint64 setId, const MTPmessages_StickerSet &result)
_stickerSetRequests.remove(setId);
if (result.type() != mtpc_messages_stickerSet) return;
const auto &d(result.c_messages_stickerSet());
auto &d(result.c_messages_stickerSet());
if (d.vset.type() != mtpc_stickerSet) return;
const auto &s(d.vset.c_stickerSet());
auto &s(d.vset.c_stickerSet());
auto &sets = Global::RefStickerSets();
auto it = sets.find(setId);
@@ -937,7 +937,7 @@ void ApiWrap::gotStickerSet(uint64 setId, const MTPmessages_StickerSet &result)
it->hash = s.vhash.v;
it->shortName = qs(s.vshort_name);
it->title = stickerSetTitle(s);
auto clientFlags = it->flags & (MTPDstickerSet_ClientFlag::f_featured | MTPDstickerSet_ClientFlag::f_not_loaded);
auto clientFlags = it->flags & (MTPDstickerSet_ClientFlag::f_featured | MTPDstickerSet_ClientFlag::f_unread | MTPDstickerSet_ClientFlag::f_not_loaded);
it->flags = s.vflags.v | clientFlags;
it->flags &= ~MTPDstickerSet_ClientFlag::f_not_loaded;