diff --git a/NEWS.md b/NEWS.md index db610aa..c9598d9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -40,6 +40,9 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Changed +- Fix menu not opening after a refresh without internet connection + [#53](https://github.com/orontee/taranis/issues/53) + - Don't open menu during data refresh [#51](https://github.com/orontee/taranis/issues/51) diff --git a/src/app.h b/src/app.h index 0587adb..aad9af7 100644 --- a/src/app.h +++ b/src/app.h @@ -278,7 +278,7 @@ class App { ClearTimerByName(App::refresh_timer_name); - this->model->refresh_date = 0; + clear_model_weather_conditions(); const auto units = Units{this->model}.to_string(); try { @@ -299,10 +299,6 @@ class App { } this->model->alerts = this->service->get_alerts(); - - const auto event_handler = GetEventHandler(); - SendEvent(event_handler, EVT_CUSTOM, CustomEvent::model_updated, 0); - } catch (const ConnectionError &error) { Message( ICON_WARNING, GetLangText("Network error"), @@ -321,6 +317,10 @@ class App { } SetHardTimer(App::refresh_timer_name, &taranis::App::refresh_data_maybe, App::refresh_period); + + const auto event_handler = GetEventHandler(); + SendEvent(event_handler, EVT_CUSTOM, CustomEvent::model_updated, 0); + HideHourglass(); }