From 5705ad10e243fed6fd06f938d038ad9a857d368c Mon Sep 17 00:00:00 2001 From: StackZ <47382115+SuperSaiyajinStackZ@users.noreply.github.com> Date: Thu, 2 Jan 2020 08:44:27 +0100 Subject: [PATCH] Add WiFi Checks for things, which need it. For example by updating Stores or the store search download functions. --- source/screens/unistore.cpp | 60 ++++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 24 deletions(-) diff --git a/source/screens/unistore.cpp b/source/screens/unistore.cpp index 2aa936c..921f734 100644 --- a/source/screens/unistore.cpp +++ b/source/screens/unistore.cpp @@ -450,25 +450,29 @@ void UniStore::StoreSelectionLogic(u32 hDown, u32 hHeld, touchPosition touch) { } if ((hDown & KEY_Y) || (hDown & KEY_TOUCH && touching(touch, arrowPos[5]))) { - if (Gui::promptMsg(Lang::get("WOULD_YOU_LIKE_UPDATE"))) { - if(storeInfo[selection].url != "" && storeInfo[selection].url != "MISSING: storeInfo.url" && - storeInfo[selection].file != "" && storeInfo[selection].file != "MISSING: storeInfo.file") { - ScriptHelper::downloadFile(storeInfo[selection].url, storeInfo[selection].file, Lang::get("UPDATING")); - } - if(storeInfo[selection].sheetURL != "" && storeInfo[selection].sheetURL != "MISSING: storeInfo.sheetURL" && - storeInfo[selection].storeSheet != "" && storeInfo[selection].storeSheet != "MISSING: storeInfo.sheet") { - ScriptHelper::downloadFile(storeInfo[selection].sheetURL, storeInfo[selection].storeSheet, Lang::get("UPDATING")); - } - // Refresh the list. - dirContents.clear(); - storeInfo.clear(); - chdir(Config::StorePath.c_str()); - getDirectoryContents(dirContents, {"unistore"}); - for(uint i=0;i