diff --git a/src/c/main.c b/src/c/main.c index f810127..2bd5dc3 100644 --- a/src/c/main.c +++ b/src/c/main.c @@ -70,7 +70,7 @@ static GRect s_bt_grect_b; // declare animation templates static const uint8_t s_animation_duration = 255; -static bool s_first_tick = true; +static bool s_first_tick_occurred = false; static Animation *s_head_raise_template; static Animation *s_head_out_template; static Animation *s_head_in_template; @@ -162,7 +162,7 @@ static void update_minute_1() { //// calculate new positions s_date_grect_b = GRect(s_ones_offset[ones], s_date_pos_y, s_date_bt_width, s_date_height); s_bt_grect_b = GRect(s_bt_pos_x - s_ones_offset[ones], s_bt_pos_y, s_date_bt_width, s_bt_height); - if (!s_first_tick) { + if (s_first_tick_occurred) { // no need to animate before first tick, as positions are set in init() without animating //// configure animations ////// date PropertyAnimation *date_center_prop = property_animation_create_layer_frame(text_layer_get_layer(s_date_layer), &s_date_grect_a, &s_date_grect_b); @@ -242,8 +242,8 @@ static void update_minute_60_out_handler(Animation *animation, bool finished, vo static void minute_handler(struct tm *tick_time, TimeUnits units_changed) { update_minute_1(); - if (s_first_tick) { - s_first_tick = false; + if (!s_first_tick_occurred) { + s_first_tick_occurred = true; return; // do not animate part swaps on first tick }