From: David Volovskiy Date: Sat, 3 Aug 2024 15:42:42 +0000 (-0400) Subject: Made it so the code works with a completely empty preset list X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=51176344dc5ea5393386dd609b92fddbddb895eb;p=sensor-watch.git Made it so the code works with a completely empty preset list --- diff --git a/movement/watch_faces/complication/sunrise_sunset_face.c b/movement/watch_faces/complication/sunrise_sunset_face.c index 98c7103..fbf60cf 100644 --- a/movement/watch_faces/complication/sunrise_sunset_face.c +++ b/movement/watch_faces/complication/sunrise_sunset_face.c @@ -359,7 +359,7 @@ bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *setti _sunrise_sunset_face_update_location_register(state); } _sunrise_sunset_face_update_settings_display(event, context); - } else if (_location_count == 1) { + } else if (_location_count <= 1) { movement_illuminate_led(); } if (state->page == 0) { @@ -368,7 +368,7 @@ bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *setti } break; case EVENT_LIGHT_LONG_PRESS: - if (_location_count == 1) break; + if (_location_count <= 1) break; else if (!state->page) movement_illuminate_led(); break; case EVENT_LIGHT_BUTTON_UP: