mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Show Twitch account emotes in EmotePopup (#348)
This commit is contained in:
parent
ca0a42a95f
commit
d5097e71a3
3 changed files with 11 additions and 0 deletions
|
@ -450,6 +450,10 @@ void EmoteManager::refreshTwitchEmotes(const std::shared_ptr<TwitchAccount> &use
|
||||||
std::string code = emoticon["code"].toString().toStdString();
|
std::string code = emoticon["code"].toString().toStdString();
|
||||||
emoteData.emoteSets[emoteSetString].push_back({id, code});
|
emoteData.emoteSets[emoteSetString].push_back({id, code});
|
||||||
emoteData.emoteCodes.push_back(code);
|
emoteData.emoteCodes.push_back(code);
|
||||||
|
|
||||||
|
util::EmoteData emote = getTwitchEmoteById(emoticon["id"].toInt(),
|
||||||
|
emoticon["code"].toString());
|
||||||
|
emoteData.emotes.insert(emoticon["code"].toString(), emote);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,6 +97,8 @@ public:
|
||||||
|
|
||||||
std::vector<std::string> emoteCodes;
|
std::vector<std::string> emoteCodes;
|
||||||
|
|
||||||
|
util::EmoteMap emotes;
|
||||||
|
|
||||||
bool filled = false;
|
bool filled = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
#include "messages/messagebuilder.hpp"
|
#include "messages/messagebuilder.hpp"
|
||||||
#include "providers/twitch/twitchchannel.hpp"
|
#include "providers/twitch/twitchchannel.hpp"
|
||||||
|
#include "singletons/accountmanager.hpp"
|
||||||
|
|
||||||
using namespace chatterino::providers::twitch;
|
using namespace chatterino::providers::twitch;
|
||||||
using namespace chatterino::messages;
|
using namespace chatterino::messages;
|
||||||
|
@ -76,6 +77,10 @@ void EmotePopup::loadChannel(ChannelPtr _channel)
|
||||||
|
|
||||||
singletons::EmoteManager &emoteManager = singletons::EmoteManager::getInstance();
|
singletons::EmoteManager &emoteManager = singletons::EmoteManager::getInstance();
|
||||||
|
|
||||||
|
QString userID = singletons::AccountManager::getInstance().Twitch.getCurrent()->getUserId();
|
||||||
|
|
||||||
|
addEmotes(emoteManager.twitchAccountEmotes[userID.toStdString()].emotes,
|
||||||
|
"Twitch Account Emotes", "Twitch Account Emote");
|
||||||
addEmotes(emoteManager.bttvGlobalEmotes, "BetterTTV Global Emotes", "BetterTTV Global Emote");
|
addEmotes(emoteManager.bttvGlobalEmotes, "BetterTTV Global Emotes", "BetterTTV Global Emote");
|
||||||
addEmotes(*channel->bttvChannelEmotes.get(), "BetterTTV Channel Emotes",
|
addEmotes(*channel->bttvChannelEmotes.get(), "BetterTTV Channel Emotes",
|
||||||
"BetterTTV Channel Emote");
|
"BetterTTV Channel Emote");
|
||||||
|
|
Loading…
Reference in a new issue