Re-subscribe to ticks (oops!)

This commit is contained in:
Neale Pickett 2016-01-05 09:50:35 -07:00
parent c755eb7f6a
commit f515e5a2e8
2 changed files with 4 additions and 6 deletions

View File

@ -25,7 +25,7 @@
"chalk"
],
"uuid": "e7872ba0-6697-41f3-9e18-43effc3b6dfe",
"versionLabel": "1.2",
"versionLabel": "1.3",
"watchapp": {
"watchface": true
}

View File

@ -215,11 +215,7 @@ static void window_load(Window *window) {
time_t now = time(NULL);
struct tm *tick_time = localtime(&now);
if (show_seconds) {
handle_tick(tick_time, HOUR_UNIT | MINUTE_UNIT | SECOND_UNIT);
} else {
handle_tick(tick_time, HOUR_UNIT | MINUTE_UNIT);
}
handle_tick(tick_time, HOUR_UNIT | MINUTE_UNIT | (show_seconds?SECOND_UNIT:0));
}
static void window_unload(Window *window) {
@ -244,6 +240,8 @@ static void init() {
});
window_stack_push(window, true);
tick_timer_service_subscribe(HOUR_UNIT | MINUTE_UNIT | (show_seconds?SECOND_UNIT:0), handle_tick);
bluetooth_connection_service_subscribe(bt_handler);
bt_connected = bluetooth_connection_service_peek();
}