]> git.earman.xyz Git - sensor-watch.git/commitdiff
Don't try to cycle through presets if the preset count is one
authorDavid Volovskiy <devolov@gmail.com>
Sun, 8 Sep 2024 22:03:16 +0000 (18:03 -0400)
committerDavid Volovskiy <devolov@gmail.com>
Sun, 8 Sep 2024 22:03:16 +0000 (18:03 -0400)
movement/watch_faces/complication/tally_face.c

index 7267b16967fea0a897b0a6889c950372990751ab..3ea550360ded9e30cfe47d6ba98786e66f00f4be 100644 (file)
@@ -168,7 +168,7 @@ bool tally_face_loop(movement_event_t event, movement_settings_t *settings, void
             }
             break;
         case EVENT_LIGHT_LONG_PRESS:
-            if (_init_val){
+            if (TALLY_FACE_PRESETS_SIZE() > 1 && _init_val){
                 state->tally_default_idx = (state->tally_default_idx + 1) % TALLY_FACE_PRESETS_SIZE();
                 state->tally_idx = _tally_default[state->tally_default_idx];
                 if (settings->bit.button_should_sound) watch_buzzer_play_note(BUZZER_NOTE_E6, 30);