Read description for changes.

- Add Script Deletion.
- Display "This script does not exist." if script does not exist on ScriptBrowse.
- Display "Refreshing List..." if you have more scripts.
This commit is contained in:
StackZ
2020-03-06 15:59:14 +01:00
parent 331a348846
commit 05d809e0bc
5 changed files with 43 additions and 6 deletions
+4 -2
View File
@@ -217,8 +217,6 @@ UniStore::UniStore() {
ScriptHelper::downloadFile(SI.sheetURL, SI.storeSheet, Lang::get("UPDATING"));
}
}
} else {
notConnectedMsg();
}
if (ScriptHelper::checkIfValid(Config::UniStoreFile, 1) == true) {
@@ -438,6 +436,7 @@ void UniStore::updateStore(int selectedStore) {
ScriptHelper::downloadFile(storeInfo[selectedStore].sheetURL, storeInfo[selectedStore].storeSheet, Lang::get("UPDATING"));
}
// Refresh the list.
Msg::DisplayMsg(Lang::get("REFRESHING_LIST"));
dirContents.clear();
storeInfo.clear();
chdir(Config::StorePath.c_str());
@@ -474,6 +473,7 @@ void UniStore::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) {
switch(subSelection) {
case 0:
if (returnIfExist(Config::StorePath, {"unistore"}) == true) {
Msg::DisplayMsg(Lang::get("REFRESHING_LIST"));
dirContents.clear();
storeInfo.clear();
chdir(Config::StorePath.c_str());
@@ -507,6 +507,7 @@ void UniStore::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) {
if (hDown & KEY_TOUCH) {
if (touching(touch, subPos[0])) {
if (returnIfExist(Config::StorePath, {"unistore"}) == true) {
Msg::DisplayMsg(Lang::get("REFRESHING_LIST"));
dirContents.clear();
storeInfo.clear();
chdir(Config::StorePath.c_str());
@@ -540,6 +541,7 @@ void UniStore::deleteStore(int selectedStore) {
path += dirContents[selectedStore].name;
deleteFile(path.c_str());
// Refresh the list.
Msg::DisplayMsg(Lang::get("REFRESHING_LIST"));
dirContents.clear();
storeInfo.clear();
chdir(Config::StorePath.c_str());