From 29e79e5af3b210db193eb994834bb4bfe99e815f Mon Sep 17 00:00:00 2001 From: boburning Date: Sun, 30 Aug 2026 16:00:17 -0400 Subject: [PATCH] fix(shell): redraw completed Wi-Fi timer state --- src/bloomShell/main.c | 17 +++++++++++------ test/shell/bloom_shell_settings.bats | 2 ++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/bloomShell/main.c b/src/bloomShell/main.c index a525acedf..b48ea8844 100644 --- a/src/bloomShell/main.c +++ b/src/bloomShell/main.c @@ -4058,6 +4058,7 @@ int main(int argc, char **argv) continue; } BloomUiAction action = BLOOM_UI_ACTION_NONE; + int wifi_redraw_event = event.type == WIFI_EVENT_TYPE; if (event.type == MEDIA_EVENT_TYPE) { if (!media_ready || !bloom_shell_media_runtime_handle_event(&media_runtime, &event, @@ -4390,7 +4391,8 @@ int main(int argc, char **argv) } } else if (bloom_shell_wifi_connect_lifecycle_controller_active( - &wifi_connect_lifecycle_controller)) + &wifi_connect_lifecycle_controller) && + !wifi_redraw_event) continue; else if (bloom_shell_wifi_recovery_controller_active( &wifi_recovery_controller) && @@ -4404,7 +4406,8 @@ int main(int argc, char **argv) action == BLOOM_UI_ACTION_BACK) wifi_open = 0; else if (bloom_shell_wifi_recovery_controller_active( - &wifi_recovery_controller)) + &wifi_recovery_controller) && + !wifi_redraw_event) continue; else if (wifi_forget_confirm_open && action == BLOOM_UI_ACTION_GAME_SWITCHER) { @@ -4463,7 +4466,7 @@ int main(int argc, char **argv) &wifi_connect_status_controller, forget_now)) wifi_forget_confirm_open = 0; } - else if (wifi_forget_confirm_open) + else if (wifi_forget_confirm_open && !wifi_redraw_event) continue; else if (bloom_shell_wifi_forget_controller_active( &wifi_forget_controller) && @@ -4501,7 +4504,8 @@ int main(int argc, char **argv) wifi_forget_result = 0; } else if (bloom_shell_wifi_forget_controller_active( - &wifi_forget_controller)) + &wifi_forget_controller) && + !wifi_redraw_event) continue; else if (bloom_shell_wifi_profile_controller_active( &wifi_profile_controller) && @@ -4592,7 +4596,8 @@ int main(int argc, char **argv) bloom_shell_wifi_profile_controller_cycle_mode( &wifi_profile_controller); else if (bloom_shell_wifi_profile_controller_active( - &wifi_profile_controller)) + &wifi_profile_controller) && + !wifi_redraw_event) continue; else if (quick_settings && action == BLOOM_UI_ACTION_GAME_SWITCHER) { quick_settings = 0; @@ -4832,7 +4837,7 @@ int main(int argc, char **argv) else wifi_open = 0; } - else if (wifi_open) + else if (wifi_open && !wifi_redraw_event) continue; else if (remote_key_remove_confirm_open && action == BLOOM_UI_ACTION_GAME_SWITCHER) { diff --git a/test/shell/bloom_shell_settings.bats b/test/shell/bloom_shell_settings.bats index 37134a5fc..9effdd10a 100644 --- a/test/shell/bloom_shell_settings.bats +++ b/test/shell/bloom_shell_settings.bats @@ -99,6 +99,8 @@ grep -F 'wifi_game_switcher_pending = 1;' "$shell" grep -F '#define WIFI_EVENT_TYPE (SDL_USEREVENT + 2)' "$shell" grep -F '_Static_assert(WIFI_EVENT_TYPE < SDL_NUMEVENTS,' "$shell" + grep -F 'int wifi_redraw_event = event.type == WIFI_EVENT_TYPE;' "$shell" + [ "$(grep -c '!wifi_redraw_event' "$shell")" -eq 6 ] grep -F 'wifi_focus.selected == 0' "$shell" grep -F 'BLOOM_SHELL_WIFI_CONTROLLER_COMPLETE' "$shell" grep -F 'draw_wifi_profile_form(' "$shell"