diff --git a/src/providers/bttv/bttvemotes.cpp b/src/providers/bttv/bttvemotes.cpp index 4ccdda731..86407d175 100644 --- a/src/providers/bttv/bttvemotes.cpp +++ b/src/providers/bttv/bttvemotes.cpp @@ -19,11 +19,6 @@ QString getEmoteLink(QString urlTemplate, const QString &id, const QString &emot } // namespace -util::EmoteMap &BTTVEmotes::getBTTVChannelEmoteFromCaches() -{ - return _bttvChannelEmoteFromCaches; -} - void BTTVEmotes::loadGlobalEmotes() { QString url("https://api.betterttv.net/2/emotes"); @@ -91,7 +86,7 @@ void BTTVEmotes::loadChannelEmotes(const QString &channelName, std::weak_ptrgetBTTVChannelEmoteFromCaches().getOrAdd(id, [&] { + auto emote = this->channelEmoteCache.getOrAdd(id, [&] { util::EmoteData emoteData; QString link = linkTemplate; link.detach(); diff --git a/src/providers/bttv/bttvemotes.hpp b/src/providers/bttv/bttvemotes.hpp index edef6a5e2..72daf4461 100644 --- a/src/providers/bttv/bttvemotes.hpp +++ b/src/providers/bttv/bttvemotes.hpp @@ -19,15 +19,12 @@ public: util::EmoteMap channelEmotes; std::map> channelEmoteCodes; - util::EmoteMap &getBTTVChannelEmoteFromCaches(); - void loadGlobalEmotes(); void loadChannelEmotes(const QString &channelName, std::weak_ptr channelEmoteMap); - util::ConcurrentMap channels; - - util::EmoteMap _bttvChannelEmoteFromCaches; +private: + util::EmoteMap channelEmoteCache; }; } // namespace bttv