mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Removed legacy theme support from GuiThemeDownloader.
This commit is contained in:
parent
875a6bf7d7
commit
b1fec4683e
|
@ -57,11 +57,8 @@ void GuiThemeDownloader::parseThemesList()
|
|||
return;
|
||||
}
|
||||
|
||||
std::vector<std::string> themeObjects {"themeSets", "legacyThemeSets"};
|
||||
|
||||
for (auto& themeObject : themeObjects) {
|
||||
if (doc.HasMember(themeObject.c_str()) && doc[themeObject.c_str()].IsArray()) {
|
||||
const rapidjson::Value& themeSets {doc[themeObject.c_str()]};
|
||||
if (doc.HasMember("themeSets") && doc["themeSets"].IsArray()) {
|
||||
const rapidjson::Value& themeSets {doc["themeSets"]};
|
||||
for (int i {0}; i < static_cast<int>(themeSets.Size()); ++i) {
|
||||
ThemeEntry themeEntry;
|
||||
const rapidjson::Value& theme {themeSets[i]};
|
||||
|
@ -109,8 +106,7 @@ void GuiThemeDownloader::parseThemesList()
|
|||
if (screenshots[i].HasMember("image") && screenshots[i]["image"].IsString())
|
||||
screenshotEntry.image = screenshots[i]["image"].GetString();
|
||||
|
||||
if (screenshots[i].HasMember("caption") &&
|
||||
screenshots[i]["caption"].IsString())
|
||||
if (screenshots[i].HasMember("caption") && screenshots[i]["caption"].IsString())
|
||||
screenshotEntry.caption = screenshots[i]["caption"].GetString();
|
||||
|
||||
if (screenshotEntry.image != "" && screenshotEntry.caption != "")
|
||||
|
@ -118,16 +114,11 @@ void GuiThemeDownloader::parseThemesList()
|
|||
}
|
||||
}
|
||||
|
||||
if (themeObject == "themeSets")
|
||||
mThemeSets.emplace_back(themeEntry);
|
||||
else
|
||||
mLegacyThemeSets.emplace_back(themeEntry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LOG(LogInfo) << "GuiThemeDownloader: Parsed " << mThemeSets.size() << " theme sets and "
|
||||
<< mLegacyThemeSets.size() << " legacy theme sets";
|
||||
LOG(LogInfo) << "GuiThemeDownloader: Parsed " << mThemeSets.size() << " theme sets";
|
||||
}
|
||||
|
||||
void GuiThemeDownloader::onSizeChanged()
|
||||
|
|
|
@ -54,7 +54,6 @@ private:
|
|||
|
||||
std::shared_ptr<TextComponent> mTitle;
|
||||
std::vector<ThemeEntry> mThemeSets;
|
||||
std::vector<ThemeEntry> mLegacyThemeSets;
|
||||
};
|
||||
|
||||
#endif // ES_APP_GUIS_GUI_THEME_DOWNLOADER_H
|
||||
|
|
Loading…
Reference in a new issue