allow watch faces to advise of other things in addition to needing a background task
This commit is contained in:
@@ -277,11 +277,14 @@ void clock_face_resign(void *context) {
|
||||
(void) context;
|
||||
}
|
||||
|
||||
bool clock_face_wants_background_task(void *context) {
|
||||
movement_watch_face_advisory_t clock_face_advise(void *context) {
|
||||
movement_watch_face_advisory_t retval = { 0 };
|
||||
clock_state_t *state = (clock_state_t *) context;
|
||||
if (!state->time_signal_enabled) return false;
|
||||
|
||||
watch_date_time date_time = watch_rtc_get_date_time();
|
||||
if (state->time_signal_enabled) {
|
||||
watch_date_time date_time = watch_rtc_get_date_time();
|
||||
retval.wants_background_task = date_time.unit.minute == 0;
|
||||
}
|
||||
|
||||
return date_time.unit.minute == 0;
|
||||
return retval;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user