Fix part swaps occuring multiple times if the face is exited and re-opened on a 30-minute interval
This commit is contained in:
@@ -69,7 +69,8 @@ static GRect s_date_grect_b;
|
||||
static GRect s_bt_grect_b;
|
||||
|
||||
// declare animation templates
|
||||
static uint8_t s_animation_duration = 255;
|
||||
static const uint8_t s_animation_duration = 255;
|
||||
static bool s_first_tick = true;
|
||||
static Animation *s_head_raise_template;
|
||||
static Animation *s_head_out_template;
|
||||
static Animation *s_head_in_template;
|
||||
@@ -253,6 +254,12 @@ static void update_minute_60() {
|
||||
}
|
||||
|
||||
static void minute_handler(struct tm *tick_time, TimeUnits units_changed) {
|
||||
update_minute_1();
|
||||
if (s_first_tick) {
|
||||
s_first_tick = false;
|
||||
return; // do not animate part swaps on first tick
|
||||
}
|
||||
|
||||
if (tick_time->tm_min % 60 == 0) {
|
||||
update_minute_60();
|
||||
} else if (tick_time->tm_min % 30 == 0) {
|
||||
|
||||
Reference in New Issue
Block a user