feat: Live Emote Updates for 7TV (#4090)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -46,4 +46,23 @@ EmotePtr cachedOrMakeEmotePtr(
|
||||
}
|
||||
}
|
||||
|
||||
EmoteMap::const_iterator EmoteMap::findEmote(const QString &emoteNameHint,
|
||||
const QString &emoteID) const
|
||||
{
|
||||
auto it = this->end();
|
||||
if (!emoteNameHint.isEmpty())
|
||||
{
|
||||
it = this->find(EmoteName{emoteNameHint});
|
||||
}
|
||||
|
||||
if (it == this->end() || it->second->id.string != emoteID)
|
||||
{
|
||||
it = std::find_if(this->begin(), this->end(),
|
||||
[emoteID](const auto entry) {
|
||||
return entry.second->id.string == emoteID;
|
||||
});
|
||||
}
|
||||
return it;
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user