diff --git a/include/screens/unistore.hpp b/include/screens/unistore.hpp index 9b6c0c4..e254ced 100644 --- a/include/screens/unistore.hpp +++ b/include/screens/unistore.hpp @@ -57,6 +57,7 @@ private: void execute(); void descript(); void updateStore(int selectedStore); + void deleteStore(int selectedStore); bool handleIfDisplayText(); int mode = 0; int selectedOptionAppStore = 0; diff --git a/romfs/lang/en/app.json b/romfs/lang/en/app.json index 2bd2afd..f165dc9 100644 --- a/romfs/lang/en/app.json +++ b/romfs/lang/en/app.json @@ -110,5 +110,6 @@ "OWNER_AND_REPO": "Owner & Repo", "FILENAME": "Filename", - "OK": "OK" + "OK": "OK", + "DELETE_STORE": "Would you like to delete this store?" } diff --git a/source/screens/unistore.cpp b/source/screens/unistore.cpp index 730afbf..f4cb6e1 100644 --- a/source/screens/unistore.cpp +++ b/source/screens/unistore.cpp @@ -476,6 +476,28 @@ void UniStore::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) { } } +void UniStore::deleteStore(int selectedStore) { + std::string path = Config::StorePath; + path += dirContents[selectedStore].name; + deleteFile(path.c_str()); + // Refresh the list. + dirContents.clear(); + storeInfo.clear(); + chdir(Config::StorePath.c_str()); + getDirectoryContents(dirContents, {"unistore"}); + for(uint i=0;i