Start parsing unknown badges (i.e. game badges)
Prepare channel-specific data to be loaded (i.e. subscription badges)
This commit is contained in:
+9
-5
@@ -41,12 +41,11 @@ Resources::Resources(EmoteManager &emoteManager, WindowManager &windowManager)
|
||||
util::urlJsonFetch(badgesUrl, [this, &emoteManager, &windowManager](QJsonObject &root) {
|
||||
QJsonObject sets = root.value("badge_sets").toObject();
|
||||
|
||||
for (auto it = std::begin(sets); it != std::end(sets); ++it) {
|
||||
for (QJsonObject::iterator it = sets.begin(); it != sets.end(); ++it) {
|
||||
QJsonObject versions = it.value().toObject().value("versions").toObject();
|
||||
|
||||
auto &badgeSet = this->badgeSets[it.key().toStdString()];
|
||||
|
||||
std::map<std::string, BadgeVersion> &versionsMap = badgeSet.versions;
|
||||
|
||||
QJsonObject versions = it.value().value("versions").toObject();
|
||||
auto &versionsMap = badgeSet.versions;
|
||||
|
||||
for (auto versionIt = std::begin(versions); versionIt != std::end(versions);
|
||||
++versionIt) {
|
||||
@@ -91,4 +90,9 @@ void Resources::Channel::loadData()
|
||||
*/
|
||||
}
|
||||
|
||||
void Resources::loadChannelData(const std::string &roomID, bool bypassCache)
|
||||
{
|
||||
qDebug() << "Load channel data for" << QString::fromStdString(roomID);
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user