diff --git a/src/emotemanager.cpp b/src/emotemanager.cpp index 5d17fe86c..1c11948cc 100644 --- a/src/emotemanager.cpp +++ b/src/emotemanager.cpp @@ -160,11 +160,6 @@ EmoteMap &EmoteManager::getBTTVChannelEmoteFromCaches() return _bttvChannelEmoteFromCaches; } -EmoteMap &EmoteManager::getEmojis() -{ - return this->emojis; -} - ConcurrentMap &EmoteManager::getFFZChannelEmoteFromCaches() { return _ffzChannelEmoteFromCaches; @@ -226,7 +221,8 @@ void EmoteManager::loadEmojis() "emojione/2.2.6/assets/png/" + code + ".png"; - this->emojis.insert(code, EmoteData(new LazyLoadedImage(url, 0.35))); + this->emojis.insert(code, EmoteData(new LazyLoadedImage(url, 0.35, ":" + shortCode + ":", + ":" + shortCode + ":"))); // TODO(pajlada): The vectors in emojiFirstByte need to be sorted by // emojiData.code.length() @@ -303,8 +299,8 @@ void EmoteManager::parseEmojis(std::vector> &pars matchedEmoji.code + ".png"; // Create or fetch cached emoji image - auto emojiImage = this->emojiCache.getOrAdd(url, [this, &url] { - return EmoteData(new LazyLoadedImage(url, 0.35)); // + auto emojiImage = this->emojis.getOrAdd(matchedEmoji.code, [this, &url] { + return EmoteData(new LazyLoadedImage(url, 0.35, "?????????", "???????????????")); // }); // Push the emoji as a word to parsedWords diff --git a/src/emotemanager.hpp b/src/emotemanager.hpp index b0dd44c0e..ae026d414 100644 --- a/src/emotemanager.hpp +++ b/src/emotemanager.hpp @@ -54,7 +54,6 @@ public: EmoteMap &getFFZEmotes(); EmoteMap &getChatterinoEmotes(); EmoteMap &getBTTVChannelEmoteFromCaches(); - EmoteMap &getEmojis(); ConcurrentMap &getFFZChannelEmoteFromCaches(); ConcurrentMap &getTwitchEmoteFromCache(); @@ -88,7 +87,6 @@ private: QMap> emojiFirstByte; // url Emoji-one image - EmoteMap emojiCache; EmoteMap emojis; void loadEmojis();