Move twitch emote-related stuff to TwitchEmotes class
This commit is contained in:
@@ -4,8 +4,7 @@
|
||||
|
||||
#include "emojis.hpp"
|
||||
#include "messages/image.hpp"
|
||||
#include "providers/twitch/emotevalue.hpp"
|
||||
#include "providers/twitch/twitchaccount.hpp"
|
||||
#include "providers/twitch/twitchemotes.hpp"
|
||||
#include "signalvector.hpp"
|
||||
#include "util/concurrentmap.hpp"
|
||||
#include "util/emotemap.hpp"
|
||||
@@ -27,6 +26,8 @@ public:
|
||||
|
||||
~EmoteManager() = delete;
|
||||
|
||||
providers::twitch::TwitchEmotes twitch;
|
||||
|
||||
void initialize();
|
||||
|
||||
void reloadBTTVChannelEmotes(const QString &channelName,
|
||||
@@ -42,8 +43,6 @@ public:
|
||||
|
||||
util::EmoteData getCheerImage(long long int amount, bool animated);
|
||||
|
||||
util::EmoteData getTwitchEmoteById(long int id, const QString &emoteName);
|
||||
|
||||
pajlada::Signals::NoArgSignal &getGifUpdateSignal();
|
||||
|
||||
// Bit badge/emotes?
|
||||
@@ -71,34 +70,6 @@ public:
|
||||
|
||||
std::vector<std::string> emojiShortCodes;
|
||||
|
||||
/// Twitch emotes
|
||||
void refreshTwitchEmotes(const std::shared_ptr<providers::twitch::TwitchAccount> &user);
|
||||
|
||||
struct TwitchAccountEmoteData {
|
||||
struct TwitchEmote {
|
||||
std::string id;
|
||||
std::string code;
|
||||
};
|
||||
|
||||
// emote set
|
||||
std::map<std::string, std::vector<TwitchEmote>> emoteSets;
|
||||
|
||||
std::vector<std::string> emoteCodes;
|
||||
|
||||
util::EmoteMap emotes;
|
||||
|
||||
bool filled = false;
|
||||
};
|
||||
|
||||
std::map<std::string, TwitchAccountEmoteData> twitchAccountEmotes;
|
||||
|
||||
private:
|
||||
// emote code
|
||||
util::ConcurrentMap<QString, providers::twitch::EmoteValue *> _twitchEmotes;
|
||||
|
||||
// emote id
|
||||
util::ConcurrentMap<long, util::EmoteData> _twitchEmoteFromCache;
|
||||
|
||||
/// BTTV emotes
|
||||
util::EmoteMap bttvChannelEmotes;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user