refactor: rename Badge to TwitchBadge (#6706)

this change is made to clarify that the previously-called Badge object
is actually specialized for Twitch badges
This commit is contained in:
pajlada
2026-01-04 12:52:02 +01:00
committed by GitHub
parent 7fed720d18
commit 18e3d7c72b
190 changed files with 1058 additions and 1049 deletions
+4 -4
View File
@@ -95,8 +95,8 @@ ContextMap buildContextMap(const MessagePtr &m, chatterino::Channel *channel)
using MessageFlag = chatterino::MessageFlag;
QStringList badges;
badges.reserve(m->badges.size());
for (const auto &e : m->badges)
badges.reserve(m->twitchBadges.size());
for (const auto &e : m->twitchBadges)
{
badges << e.key_;
}
@@ -114,9 +114,9 @@ ContextMap buildContextMap(const MessagePtr &m, chatterino::Channel *channel)
continue;
}
subscribed = true;
if (m->badgeInfos.find(subBadge) != m->badgeInfos.end())
if (m->twitchBadgeInfos.find(subBadge) != m->twitchBadgeInfos.end())
{
subLength = m->badgeInfos.at(subBadge).toInt();
subLength = m->twitchBadgeInfos.at(subBadge).toInt();
}
}
ContextMap vars = {