]> git.earman.xyz Git - sensor-watch.git/commitdiff
Made it so the code works with a completely empty preset list
authorDavid Volovskiy <devolov@gmail.com>
Sat, 3 Aug 2024 15:42:42 +0000 (11:42 -0400)
committerDavid Volovskiy <devolov@gmail.com>
Sat, 3 Aug 2024 15:42:42 +0000 (11:42 -0400)
movement/watch_faces/complication/sunrise_sunset_face.c

index 98c7103fb7f1e3c56e6f08b06ff98140b7dba382..fbf60cfeeca69c21418afdf6fc7c9f9f74d70673 100644 (file)
@@ -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: