aboutsummaryrefslogtreecommitdiff
path: root/src/c/gw2et.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c/gw2et.c')
-rw-r--r--src/c/gw2et.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/c/gw2et.c b/src/c/gw2et.c
index e591868..42e67df 100644
--- a/src/c/gw2et.c
+++ b/src/c/gw2et.c
@@ -4,6 +4,7 @@
*/
#include <pebble.h>
+#include "config.h"
#include "event.h"
#define DEFAULT_NUM_EVENTS 30
@@ -101,12 +102,18 @@ static void main_window_unload(Window *window) {
menu_layer_destroy(main_menu);
}
+void reload_data() {
+ menu_layer_reload_data(main_menu);
+}
+
static void tick_handler(struct tm *tick_time, TimeUnits units_changed) {
update_event_index();
- menu_layer_reload_data(main_menu);
+ reload_data();
}
static void init() {
+ config_init();
+
main_window = window_create();
window_set_window_handlers(main_window, (WindowHandlers) {
.load = main_window_load,
@@ -119,6 +126,7 @@ static void init() {
}
static void deinit() {
+ config_deinit();
tick_timer_service_unsubscribe();
window_destroy(main_window);
cleanup_events();