dashboard: keep overview values visible when returning from battery detail

This commit is contained in:
2026-06-18 23:54:58 -06:00
parent fc65f93093
commit 676a0eff60
2 changed files with 3 additions and 7 deletions
@@ -1,6 +1,6 @@
#pragma once #pragma once
static const char *DASHBOARD_VERSION = "0.1.101-battery-detail-cache-reset"; static const char *DASHBOARD_VERSION = "0.1.102-keep-overview-data-on-return";
// 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";
@@ -686,13 +686,9 @@ static void close_battery_detail_screen()
lv_obj_add_flag(battery_detail_page, LV_OBJ_FLAG_HIDDEN); lv_obj_add_flag(battery_detail_page, LV_OBJ_FLAG_HIDDEN);
} }
// Keep the existing overview widgets exactly as-is.
// The next successful API poll will refresh them naturally.
current_dashboard_screen = SCREEN_OVERVIEW; current_dashboard_screen = SCREEN_OVERVIEW;
reset_overview_widget_cache();
fast_status_refresh_requested = true;
metadata_refresh_requested = true;
invalidate_overview_widget_cache();
refresh_dashboard_widgets();
} }
static void create_battery_detail_screen() static void create_battery_detail_screen()