1
0
Fork 0
mirror of https://github.com/HamletDuFromage/aio-switch-updater.git synced 2024-11-24 18:42:05 +00:00

Fixed crashes in airplane mode introduced in 2.10.0

This commit is contained in:
flb 2021-07-09 02:15:56 +02:00
parent 2c9b2c2f15
commit d24e3a1461
3 changed files with 17 additions and 12 deletions

View file

@ -22,7 +22,7 @@ DATA := data
INCLUDES := include lib/zipper/include /lib/borealis/library/include/borealis/extern/nlohmann
APP_TITLE := All-in-One Switch Updater
APP_AUTHOR := HamletDuFromage
APP_VERSION := 2.10.0
APP_VERSION := 2.10.1
TARGET := $(notdir $(CURDIR))
ROMFS := resources

View file

@ -20,7 +20,7 @@ AmsTab::AmsTab(const bool erista) : brls::List()
download::getRequest(AMS_URL, cfws);
CreateDownloadItems(cfws["Atmosphere"]);
CreateDownloadItems(cfws.find("Atmosphere") != cfws.end() ? cfws["Atmosphere"] : nlohmann::ordered_json::object());
description = new brls::Label(
brls::LabelStyle::DESCRIPTION,
@ -38,18 +38,20 @@ AmsTab::AmsTab(const bool erista) : brls::List()
});
this->addView(listItem);
CreateDownloadItems(cfws["DeepSea"], false);
CreateDownloadItems(cfws.find("DeepSea") != cfws.end() ? cfws["DeepSea"] : nlohmann::ordered_json::object());
auto custom_pack = fs::parseJsonFile(CUSTOM_PACKS_PATH);
if (custom_pack.size() != 0) {
description = new brls::Label(
brls::LabelStyle::DESCRIPTION,
fmt::format("menus/ams_update/custom_packs_label"_i18n, CUSTOM_PACKS_PATH),
true
);
this->addView(description);
if(cfws.size()) {
auto custom_pack = fs::parseJsonFile(CUSTOM_PACKS_PATH);
if (custom_pack.size() != 0) {
description = new brls::Label(
brls::LabelStyle::DESCRIPTION,
fmt::format("menus/ams_update/custom_packs_label"_i18n, CUSTOM_PACKS_PATH),
true
);
this->addView(description);
CreateDownloadItems(custom_pack, true);
CreateDownloadItems(custom_pack, true);
}
}
}

View file

@ -175,6 +175,9 @@ ChangelogPage::ChangelogPage() : AppletFrame(true, true)
verTitles.push_back("v2.10.0");
changes.push_back("\uE016 Added support custom packs through a json file.");
verTitles.push_back("v2.10.1");
changes.push_back("\uE016 Fixed crashes in airplane mode introduced in 2.10.0");
for(int i = verTitles.size() -1 ; i >= 0; i--){
listItem = new brls::ListItem(verTitles[i]);
change = changes[i];