1
0
mirror of synced 2024-11-25 00:00:27 +01:00

fix: Remove unused update parameter

This commit is contained in:
WerWolv 2023-12-28 21:51:31 +01:00
parent 8fcf08132e
commit 2f7da91a73
2 changed files with 5 additions and 5 deletions

View File

@ -68,7 +68,7 @@ namespace hex::plugin::builtin {
void addCategory(const UnlocalizedString &unlocalizedName, const std::string &requestName, fs::ImHexPath path, std::function<void()> downloadCallback = []{}); void addCategory(const UnlocalizedString &unlocalizedName, const std::string &requestName, fs::ImHexPath path, std::function<void()> downloadCallback = []{});
bool download(fs::ImHexPath pathType, const std::string &fileName, const std::string &url, bool update); bool download(fs::ImHexPath pathType, const std::string &fileName, const std::string &url);
bool remove(fs::ImHexPath pathType, const std::string &fileName); bool remove(fs::ImHexPath pathType, const std::string &fileName);
private: private:

View File

@ -129,7 +129,7 @@ namespace hex::plugin::builtin {
if (entry.hasUpdate) { if (entry.hasUpdate) {
if (ImGui::Button("hex.builtin.view.store.update"_lang, buttonSize)) { if (ImGui::Button("hex.builtin.view.store.update"_lang, buttonSize)) {
entry.downloading = this->download(category.path, entry.fileName, entry.link, !entry.system); entry.downloading = this->download(category.path, entry.fileName, entry.link);
} }
} else if (entry.system) { } else if (entry.system) {
ImGui::BeginDisabled(); ImGui::BeginDisabled();
@ -142,7 +142,7 @@ namespace hex::plugin::builtin {
} }
} else if (!entry.installed) { } else if (!entry.installed) {
if (ImGui::Button("hex.builtin.view.store.download"_lang, buttonSize)) { if (ImGui::Button("hex.builtin.view.store.download"_lang, buttonSize)) {
entry.downloading = this->download(category.path, entry.fileName, entry.link, false); entry.downloading = this->download(category.path, entry.fileName, entry.link);
AchievementManager::unlockAchievement("hex.builtin.achievement.misc", "hex.builtin.achievement.misc.download_from_store.name"); AchievementManager::unlockAchievement("hex.builtin.achievement.misc", "hex.builtin.achievement.misc.download_from_store.name");
} }
} else { } else {
@ -202,7 +202,7 @@ namespace hex::plugin::builtin {
for (auto &category : m_categories) { for (auto &category : m_categories) {
for (auto &entry : category.entries) { for (auto &entry : category.entries) {
if (entry.hasUpdate) { if (entry.hasUpdate) {
entry.downloading = this->download(category.path, entry.fileName, entry.link, true); entry.downloading = this->download(category.path, entry.fileName, entry.link);
if (!m_download.valid()) if (!m_download.valid())
continue; continue;
@ -293,7 +293,7 @@ namespace hex::plugin::builtin {
this->drawStore(); this->drawStore();
} }
bool ViewStore::download(fs::ImHexPath pathType, const std::string &fileName, const std::string &url, bool update) { bool ViewStore::download(fs::ImHexPath pathType, const std::string &fileName, const std::string &url) {
bool downloading = false; bool downloading = false;
for (const auto &folderPath : fs::getDefaultPaths(pathType)) { for (const auto &folderPath : fs::getDefaultPaths(pathType)) {
if (!fs::isPathWritable(folderPath)) if (!fs::isPathWritable(folderPath))