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>
This commit is contained in:
parent
626139a0b8
commit
a2e3e866a6
2
src/io.c
2
src/io.c
@ -693,8 +693,10 @@ void io_load_todo(struct item_filter *filter)
|
|||||||
/* Load appointments and todo items */
|
/* Load appointments and todo items */
|
||||||
void io_load_data(struct item_filter *filter)
|
void io_load_data(struct item_filter *filter)
|
||||||
{
|
{
|
||||||
|
run_hook("pre-load");
|
||||||
io_load_app(filter);
|
io_load_app(filter);
|
||||||
io_load_todo(filter);
|
io_load_todo(filter);
|
||||||
|
run_hook("post-load");
|
||||||
}
|
}
|
||||||
|
|
||||||
void io_reload_data(void)
|
void io_reload_data(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user