Skip to content

Commit 2262a5d

Browse files
committed
Update the time even when the horse is overridden.
Signed-off-by: Katharine Berry <ktbry@google.com>
1 parent 96335b5 commit 2262a5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/c/root_window.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,11 @@ static void prv_app_message_handler(DictionaryIterator *iter, void *context) {
169169

170170
static void prv_time_changed(struct tm *tick_time, TimeUnits time_changed, void *context) {
171171
RootWindow* rw = context;
172+
format_time(rw->time_string, sizeof(rw->time_string), tick_time);
173+
text_layer_set_text(rw->time_layer, rw->time_string);
172174
if (rw->talking_horse_overridden) {
173175
return;
174176
}
175-
format_time(rw->time_string, sizeof(rw->time_string), tick_time);
176177
if (tick_time->tm_hour >= 6 && tick_time->tm_hour < 12) {
177178
talking_horse_layer_set_text(rw->talking_horse_layer, "Good morning!");
178179
} else if (tick_time->tm_hour >= 12 && tick_time->tm_hour < 18) {
@@ -182,7 +183,6 @@ static void prv_time_changed(struct tm *tick_time, TimeUnits time_changed, void
182183
} else {
183184
talking_horse_layer_set_text(rw->talking_horse_layer, "Hey there, night owl!");
184185
}
185-
text_layer_set_text(rw->time_layer, rw->time_string);
186186
}
187187

188188
static void prv_click_config_provider(void *context) {

0 commit comments

Comments
 (0)