From: David Volovskiy Date: Wed, 27 Aug 2025 21:17:11 +0000 (-0400) Subject: Moved sleep animation check into the function rather than the switch statement X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=db2d5cbf68e3585342ff361e3f277d4a6c9a3bb1;p=sensor-watch.git Moved sleep animation check into the function rather than the switch statement --- diff --git a/watch-faces/complication/endless_runner_face.c b/watch-faces/complication/endless_runner_face.c index a3f7e37..a0dc85d 100644 --- a/watch-faces/complication/endless_runner_face.c +++ b/watch-faces/complication/endless_runner_face.c @@ -551,6 +551,9 @@ void endless_runner_face_activate(void *context) { ball_arr_seg = is_custom_lcd ? custom_ball_arr_seg : classic_ball_arr_seg; obstacle_arr_com = is_custom_lcd ? custom_obstacle_arr_com : classic_obstacle_arr_com; obstacle_arr_seg = is_custom_lcd ? custom_obstacle_arr_seg : classic_obstacle_arr_seg; + if (watch_sleep_animation_is_running()) { + watch_stop_blink(); + } } bool endless_runner_face_loop(movement_event_t event, void *context) { @@ -558,9 +561,6 @@ bool endless_runner_face_loop(movement_event_t event, void *context) { switch (event.event_type) { case EVENT_ACTIVATE: disable_tap_control(state); - if (watch_sleep_animation_is_running()) { - watch_stop_blink(); - } check_and_reset_hi_score(state); display_title(state); break;