}
void world_clock_face_activate(movement_settings_t *settings, void *context) {
+ (void) settings;
world_clock_state_t *state = (world_clock_state_t *)context;
state->current_screen = 0;
- state->previous_date_time = 0xFFFFFFFF;
if (watch_tick_animation_is_running()) watch_stop_tick_animation();
- if (settings->bit.clock_mode_24h) watch_set_indicator(WATCH_INDICATOR_24H);
-
- watch_set_colon();
}
static bool world_clock_face_do_display_mode(movement_event_t event, movement_settings_t *settings, world_clock_state_t *state) {
watch_date_time date_time;
switch (event.event_type) {
case EVENT_ACTIVATE:
+ if (settings->bit.clock_mode_24h) watch_set_indicator(WATCH_INDICATOR_24H);
+ watch_set_colon();
+ state->previous_date_time = 0xFFFFFFFF;
+ // fall through
case EVENT_TICK:
case EVENT_LOW_ENERGY_UPDATE:
date_time = watch_rtc_get_date_time();
if (state->current_screen > 3) {
movement_request_tick_frequency(1);
state->current_screen = 0;
- state->previous_date_time = 0xFFFFFFFF;
if (state->backup_register) watch_store_backup_data(state->settings.reg, state->backup_register);
- world_clock_face_do_display_mode(event, settings, state);
+ event.event_type = EVENT_ACTIVATE;
+ return world_clock_face_do_display_mode(event, settings, state);
}
break;
case EVENT_ALARM_BUTTON_DOWN: