Removed redownload / cache

This commit is contained in:
CommanderRedYT
2021-11-01 20:17:13 +01:00
parent d75f226583
commit 7e5994812b
3 changed files with 0 additions and 16 deletions

View File

@ -25,7 +25,6 @@ namespace {
bool request_running = false;
uint16_t request_failed = false;
bool parsing_finished = false;
static bool redownload = true;
cpputils::DelayedConstruction<AsyncHttpRequest> request;
std::string get_ota_url_from_index(uint16_t index)
@ -113,7 +112,6 @@ namespace {
url_for_latest = fix_url(fmt::format("{}{}", stringSettings.otaServerUrl, doc["latest"].as<std::string>()));
url_for_hashes = fix_url(fmt::format("{}{}", stringSettings.otaServerUrl, doc["url"].as<std::string>()));
parsing_finished = true;
redownload = false;
}
void setup_request()
@ -124,11 +122,6 @@ namespace {
void start_descriptor_request(std::string server_base_url)
{
if (!redownload)
{
parsing_finished = true;
return;
}
if (!request.constructed())
{
ESP_LOGW("BOBBY", "request is im oarsch");

View File

@ -24,13 +24,6 @@ using namespace espgui;
namespace {
class RedownloadJsonAction : public virtual ActionInterface {
public:
void triggered() override {
redownload = true;
}
};
class OtaMenu :
public MenuDisplay,
public StaticText<TEXT_UPDATE>,
@ -42,7 +35,6 @@ public:
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SELECTBUILD>, SwitchScreenAction<SelectBuildMenu>, StaticMenuItemIcon<&bobbyicons::presets>>>();
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_UPDATENOW>, SwitchScreenAction<UpdateDisplay>, StaticMenuItemIcon<&bobbyicons::update>>>();
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SELECTBUILDSERVERMENU>, SwitchScreenAction<SelectBuildServerMenu>>>();
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_REDOWNLOAD>, RedownloadJsonAction>>();
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
}
};

View File

@ -45,7 +45,6 @@ public:
stringSettings.otaUrl = m_buildserver_url;
}
saveSettings();
redownload = true;
url_for_latest.clear();
url_for_hashes.clear();
availableVersions = {};