mirror of
https://github.com/tiennm99/claude-code-usage-bubble.git
synced 2026-06-07 00:15:10 +00:00
fix(menu): repaint cached data and poll after Reset Position
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.
This commit is contained in:
@@ -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<()>) {
|
||||
|
||||
Reference in New Issue
Block a user