/* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once namespace Main { class Session; } // namespace Main class HistoryItem; class DocumentData; namespace Stickers { class EmojiPack final { public: explicit EmojiPack(not_null session); bool add(not_null item, const QString &text); bool remove(not_null item); [[nodiscard]] DocumentData *stickerForEmoji(not_null item); private: void refresh(); void refreshDelayed(); void applySet(const MTPDmessages_stickerSet &data); void applyPack( const MTPDstickerPack &data, const base::flat_map> &map); base::flat_map> collectStickers( const QVector &list) const; void refreshItems(EmojiPtr emoji); not_null _session; base::flat_set> _notLoaded; base::flat_map> _map; base::flat_map>> _items; mtpRequestId _requestId = 0; rpl::lifetime _lifetime; }; } // namespace Stickers