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

stickers by alt suggestions in mentions dropdown

This commit is contained in:
John Preston
2016-01-09 19:24:16 +08:00
parent f66c54ee6b
commit a72a31e722
22 changed files with 471 additions and 149 deletions

View File

@@ -4607,8 +4607,14 @@ void MainWidget::feedUpdate(const MTPUpdate &update) {
const MTPDstickerSet &s(set.vset.c_stickerSet());
StickerSets &sets(cRefStickerSets());
sets.insert(s.vid.v, StickerSet(s.vid.v, s.vaccess_hash.v, stickerSetTitle(s), qs(s.vshort_name), s.vcount.v, s.vhash.v, s.vflags.v)).value().stickers = pack;
StickerSets::iterator it = sets.find(s.vid.v);
if (it != sets.cend()) {
Global::StickersByEmoji_RemovePack(it->stickers);
} else {
it = sets.insert(s.vid.v, StickerSet(s.vid.v, s.vaccess_hash.v, stickerSetTitle(s), qs(s.vshort_name), s.vcount.v, s.vhash.v, s.vflags.v));
}
it->stickers = pack;
Global::StickersByEmoji_AddPack(pack);
StickerSetsOrder &order(cRefStickerSetsOrder());
int32 insertAtIndex = 0, currentIndex = order.indexOf(s.vid.v);