From 296bda90619a558a1f9146bc7b6b859e593ccb3f Mon Sep 17 00:00:00 2001 From: Warwick New Date: Thu, 25 Jun 2026 15:35:05 +0100 Subject: [PATCH] Renamed fasting window to eating window as to make more sense --- package.json | 4 ++-- src/c/main.c | 16 ++++++++-------- src/c/main.h | 4 ++-- src/pkjs/config.js | 10 +++++----- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 055d1a8..cb967d0 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,8 @@ "messageKeys": [ "BackgroundColor", "ForegroundColor", - "FastBegin", - "FastEnd" + "EatingWindowBegin", + "EatingWindowEnd" ], "resources": { "media": [] diff --git a/src/c/main.c b/src/c/main.c index 632f227..085c3a6 100644 --- a/src/c/main.c +++ b/src/c/main.c @@ -13,8 +13,8 @@ static ClaySettings settings; static void default_settings() { settings.BackgroundColor = GColorBlack; settings.ForegroundColor = GColorWhite; - settings.FastBegin = "12:00"; - settings.FastEnd = "20:00"; + settings.EatingWindowBegin = "12:00"; + settings.EatingWindowEnd = "20:00"; } // Read settings from persistent storage @@ -47,15 +47,15 @@ static void inbox_recieved_callback(DictionaryIterator *iter, void *context) { } // Second Tick - Tuple *fast_begin_t = dict_find(iter, MESSAGE_KEY_FastBegin); + Tuple *fast_begin_t = dict_find(iter, MESSAGE_KEY_EatingWindowBegin); if (fast_begin_t) { - settings.FastBegin = fast_begin_t->value->cstring; + settings.EatingWindowBegin = fast_begin_t->value->cstring; } // Animations - Tuple *fast_end_t = dict_find(iter, MESSAGE_KEY_FastEnd); + Tuple *fast_end_t = dict_find(iter, MESSAGE_KEY_EatingWindowEnd); if (fast_end_t) { - settings.FastEnd = fast_end_t->value->cstring; + settings.EatingWindowEnd = fast_end_t->value->cstring; } // Save the new settings to persistent storage @@ -85,8 +85,8 @@ static void update_time() { static const char eatmsg[] = "Eat"; static const char donteatmsg[] = "Don't Eat"; - time_t fast_start = parse_time_str(settings.FastBegin); - time_t fast_end = parse_time_str(settings.FastEnd); + time_t fast_start = parse_time_str(settings.EatingWindowBegin); + time_t fast_end = parse_time_str(settings.EatingWindowEnd); if (now >= fast_start && now < fast_end) { text_layer_set_text(s_eat_layer, eatmsg); diff --git a/src/c/main.h b/src/c/main.h index 8abc3b5..0605c17 100644 --- a/src/c/main.h +++ b/src/c/main.h @@ -7,8 +7,8 @@ typedef struct ClaySettings { GColor BackgroundColor; GColor ForegroundColor; - char *FastBegin; - char *FastEnd; + char *EatingWindowBegin; + char *EatingWindowEnd; } __attribute__((__packed__)) ClaySettings; static void default_settings(); diff --git a/src/pkjs/config.js b/src/pkjs/config.js index 9968d08..494f7c6 100644 --- a/src/pkjs/config.js +++ b/src/pkjs/config.js @@ -33,12 +33,12 @@ module.exports = [ "items": [ { "type": "heading", - "defaultValue": "Fasting Period (24hr format)" + "defaultValue": "Eating Window (24hr format)" }, { "type": "input", - "messageKey": "FastBegin", - "label": "Time your fast begins", + "messageKey": "EatingWindowBegin", + "label": "Time your eating window begins", "attributes": { "placeholder": "12:00", "limit": 5, @@ -47,8 +47,8 @@ module.exports = [ }, { "type": "input", - "messageKey": "FastEnd", - "label": "Time your fast ends", + "messageKey": "EatingWindowEnd", + "label": "Time your eating window ends", "attributes": { "placeholder": "20:00", "limit": 5,