Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
inbox_received_handler C implementation for Pebble configuration
static void inbox_received_handler(DictionaryIterator *iter, void *context) {
APP_LOG(APP_LOG_LEVEL_DEBUG, "New gem color received");
Tuple *gem_color_t = dict_find(iter, KEY_GEM_COLOR);
if (gem_color_t) {
int gem_color = gem_color_t->value->int32;
persist_write_int(KEY_GEM_COLOR, gem_color);
set_background_gem(gem_color);
Layer *window_layer = window_get_root_layer(window);
layer_mark_dirty(window_layer);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment