From a2e3e866a6b77a1b236dc4375b582b327265dc3a Mon Sep 17 00:00:00 2001
From: Lukas Fleischer <lfleischer@calcurse.org>
Date: Sun, 10 Jan 2016 12:39:00 +0100
Subject: Add pre-load and post-load hooks

Potential use case: Synchronize data with some server before loading.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
---
 src/io.c | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'src')

diff --git a/src/io.c b/src/io.c
index 7411a6b..fcb13ae 100644
--- a/src/io.c
+++ b/src/io.c
@@ -693,8 +693,10 @@ void io_load_todo(struct item_filter *filter)
 /* Load appointments and todo items */
 void io_load_data(struct item_filter *filter)
 {
+	run_hook("pre-load");
 	io_load_app(filter);
 	io_load_todo(filter);
+	run_hook("post-load");
 }
 
 void io_reload_data(void)
-- 
cgit v1.2.3-70-g09d2