2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +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

@@ -2920,6 +2920,8 @@ namespace Local {
RecentStickerPack &recent(cRefRecentStickers());
recent.clear();
Global::SetStickersByEmoji(StickersByEmojiMap());
StickerSet &def(sets.insert(DefaultStickerSetId, StickerSet(DefaultStickerSetId, 0, lang(lng_stickers_default_set), QString(), 0, 0, MTPDstickerSet::flag_official)).value());
StickerSet &custom(sets.insert(CustomStickerSetId, StickerSet(CustomStickerSetId, 0, lang(lng_custom_stickers), QString(), 0, 0, 0)).value());
@@ -2993,6 +2995,8 @@ namespace Local {
StickerSetsOrder &order(cRefStickerSetsOrder());
order.clear();
Global::SetStickersByEmoji(StickersByEmojiMap());
quint32 cnt;
QByteArray hash;
stickers.stream >> cnt >> hash; // ignore hash, it is counted
@@ -3073,6 +3077,10 @@ namespace Local {
set.stickers.push_back(doc);
++set.count;
}
if (setId != CustomStickerSetId) {
Global::StickersByEmoji_AddPack(set.stickers);
}
}
}