Re-subscribe to ticks (oops!)
This commit is contained in:
parent
c755eb7f6a
commit
f515e5a2e8
|
@ -25,7 +25,7 @@
|
||||||
"chalk"
|
"chalk"
|
||||||
],
|
],
|
||||||
"uuid": "e7872ba0-6697-41f3-9e18-43effc3b6dfe",
|
"uuid": "e7872ba0-6697-41f3-9e18-43effc3b6dfe",
|
||||||
"versionLabel": "1.2",
|
"versionLabel": "1.3",
|
||||||
"watchapp": {
|
"watchapp": {
|
||||||
"watchface": true
|
"watchface": true
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,11 +215,7 @@ static void window_load(Window *window) {
|
||||||
|
|
||||||
time_t now = time(NULL);
|
time_t now = time(NULL);
|
||||||
struct tm *tick_time = localtime(&now);
|
struct tm *tick_time = localtime(&now);
|
||||||
if (show_seconds) {
|
handle_tick(tick_time, HOUR_UNIT | MINUTE_UNIT | (show_seconds?SECOND_UNIT:0));
|
||||||
handle_tick(tick_time, HOUR_UNIT | MINUTE_UNIT | SECOND_UNIT);
|
|
||||||
} else {
|
|
||||||
handle_tick(tick_time, HOUR_UNIT | MINUTE_UNIT);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void window_unload(Window *window) {
|
static void window_unload(Window *window) {
|
||||||
|
@ -243,6 +239,8 @@ static void init() {
|
||||||
.unload = window_unload,
|
.unload = window_unload,
|
||||||
});
|
});
|
||||||
window_stack_push(window, true);
|
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);
|
bluetooth_connection_service_subscribe(bt_handler);
|
||||||
bt_connected = bluetooth_connection_service_peek();
|
bt_connected = bluetooth_connection_service_peek();
|
||||||
|
|
Loading…
Reference in New Issue