dashboard: refresh widgets after overlay navigation

This commit is contained in:
2026-06-18 23:26:12 -06:00
parent 1ea44f9312
commit 6c786b8969
2 changed files with 10 additions and 1 deletions
@@ -1,6 +1,6 @@
#pragma once #pragma once
static const char *DASHBOARD_VERSION = "0.1.93-battery-detail-overlay"; static const char *DASHBOARD_VERSION = "0.1.94-refresh-after-overlay";
// Update these if your Cargo ESP AP credentials are different. // Update these if your Cargo ESP AP credentials are different.
//static const char *CARGO_WIFI_SSID = "OverlandController"; //static const char *CARGO_WIFI_SSID = "OverlandController";
@@ -1452,6 +1452,15 @@ static void parse_status_json(const String &body)
update_battery_detail_widgets(); update_battery_detail_widgets();
} }
static void refresh_dashboard_widgets()
{
refresh_dashboard_widgets();
if (current_dashboard_screen == SCREEN_BATTERY_DETAIL && battery_detail_page != nullptr) {
update_battery_detail_widgets();
}
}
static bool fetch_status_fields(const char *url, const char *label) static bool fetch_status_fields(const char *url, const char *label)
{ {
if (api_request_in_progress || WiFi.status() != WL_CONNECTED) { if (api_request_in_progress || WiFi.status() != WL_CONNECTED) {