From 5a2e4f1c601ac00d0387f8668e28262dc56dee11 Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Mon, 18 May 2026 11:28:26 +0700 Subject: [PATCH] fix(menu): repaint cached data and poll after Reset Position MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit reset_positions() destroys and recreates the bubbles, which leaves them displaying the spawn_bubble "…" placeholder until the next 5-minute TIMER_POLL fires. Push the cached snapshot via propagate_to_ui() so the last-known values appear immediately, and kick spawn_poll_thread() (idempotent via POLL_IN_FLIGHT gate) so fresh data follows shortly after. --- src/app.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app.rs b/src/app.rs index 1a08185..cbf93fe 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1182,6 +1182,12 @@ fn reset_positions() { s.bubbles.clear(); } create_initial_bubbles(); + // The freshly-spawned bubbles boot with a "…" placeholder. Push the + // cached snapshot so they render the last-known data immediately, and + // kick a poll for users who used Reset Position to recover from + // staleness. + propagate_to_ui(); + spawn_poll_thread(); } fn set_language(_dummy: Option<()>) {