Fix settings not being applied (Still waits until next draw)

This commit is contained in:
Warwick New 2026-07-24 11:55:49 +01:00
parent 296bda9061
commit 08d24ba0d7

View file

@ -58,11 +58,18 @@ static void inbox_recieved_callback(DictionaryIterator *iter, void *context) {
settings.EatingWindowEnd = fast_end_t->value->cstring; settings.EatingWindowEnd = fast_end_t->value->cstring;
} }
// Apply colour settings in the even they've been changed
text_layer_set_background_color(s_time_layer, settings.BackgroundColor);
text_layer_set_text_color(s_time_layer, settings.ForegroundColor);
text_layer_set_background_color(s_date_layer, settings.BackgroundColor);
text_layer_set_text_color(s_date_layer, settings.ForegroundColor);
// Save the new settings to persistent storage // Save the new settings to persistent storage
save_settings(); save_settings();
} }
static void update_time() { static void update_time() {
// Get a tm structure // Get a tm structure
time_t now = time(NULL); time_t now = time(NULL);
struct tm *tick_time = localtime(&now); struct tm *tick_time = localtime(&now);