Skip to content

Commit

Permalink
Hotfix for sometimes-missing statusRecencyFormat pref
Browse files Browse the repository at this point in the history
  • Loading branch information
mddub committed Nov 24, 2016
1 parent cd23616 commit 26643ec
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config/js/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
config.customLayout.recencyColorCircle = config.customLayout.recencyColorCircle || c.DEFAULT_CONFIG.customLayout.recencyColorCircle;
config.customLayout.recencyColorText = config.customLayout.recencyColorText || c.DEFAULT_CONFIG.customLayout.recencyColorText;
}
config.statusRecencyFormat = config.statusRecencyFormat || c.DEFAULT_CONFIG.statusRecencyFormat;

return config;
}
Expand Down Expand Up @@ -792,7 +793,7 @@
$('#update-available #available-version').text(c.VERSION);
$('#update-available').toggle(c.VERSION !== watchInfo.version);

$('.config-page-version').text('v' + c.VERSION);
$('.config-page-version').text('Settings page: v' + c.VERSION);

$('.color-platforms-only').toggle(['aplite', 'diorite'].indexOf(watchInfo.pf) === -1);

Expand Down
Binary file modified release/urchin-cgm.pbw
Binary file not shown.
8 changes: 7 additions & 1 deletion src/preferences.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ static void decode_colors(Preferences *prefs, uint8_t *values) {
}

static int32_t get_int32(DictionaryIterator *data, uint8_t key) {
return dict_find(data, key)->value->int32;
Tuple *t = dict_find(data, key);
if (t == NULL) {
APP_LOG(APP_LOG_LEVEL_ERROR, "No pref %d", (int)key);
return 0;
} else {
return t->value->int32;
}
}

void set_prefs(DictionaryIterator *data) {
Expand Down

0 comments on commit 26643ec

Please sign in to comment.