wakeup_schedule_simple_robust: Check result twice to account for re-tests; change the set time in the_time from the scheduler to ensure time is accurate
This commit is contained in:
1 parent
38500b14d8
commit
1f9bcef899
3 files changed
+38
-35
No files matched your search
+6
-1
@@ -1,3 +1,4 @@
|
||||
#include "scheduler.h"
|
||||
#include <pebble.h>
|
||||
|
||||
static void glance_reload_callback(AppGlanceReloadSession *session, size_t limit, void *target) {
|
||||
@@ -36,7 +37,11 @@ WakeupId wakeup_schedule_simple_robust(time_t wakeup_time, int8_t retry_diff, bo
|
||||
result = wakeup_schedule(wakeup_time, is_fallback, true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
if (result >= 0) {
|
||||
the_time.HourSet = the_time.HourWIP;
|
||||
the_time.MinuteSet = the_time.MinuteWIP;
|
||||
app_glance_reload(glance_reload_callback, (void *)(uintptr_t)wakeup_time);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user