Created
February 16, 2016 01:07
-
-
Save bani/5a3a2d531806c80def38 to your computer and use it in GitHub Desktop.
inbox_received_handler C implementation for Pebble configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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