Make TwitchEmotes class conform to QString standard
Make twitch emotes only be identified by a string ID, instead of sometimes by a string and sometimes by an int Make the EmoteSet a struct instead of just a vector of emotes. This will be handy when we later fill in the emote sets name and other info (i.e. whether it's a subscription benifit or not)
This commit is contained in:
@@ -102,13 +102,11 @@ void EmotePopup::loadChannel(ChannelPtr _channel)
|
||||
builder2.getMessage()->flags |= Message::Centered;
|
||||
builder2.getMessage()->flags |= Message::DisableCompactEmotes;
|
||||
|
||||
for (const auto &emote : set.second) {
|
||||
for (const auto &emote : set.emotes) {
|
||||
[&](const QString &key, const util::EmoteData &value) {
|
||||
builder2.append((new EmoteElement(value, MessageElement::Flags::AlwaysShow))
|
||||
->setLink(Link(Link::InsertText, key)));
|
||||
}(QString::fromStdString(emote.code),
|
||||
app->emotes->twitch.getEmoteById(QString::fromStdString(emote.id).toLong(),
|
||||
QString::fromStdString(emote.code)));
|
||||
}(emote.code, app->emotes->twitch.getEmoteById(emote.id, emote.code));
|
||||
}
|
||||
|
||||
emoteChannel->addMessage(builder2.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user