Run pre-load hook before testing for modifications

The pre-load hook is often used to manipulate the data files before
loading, such as by synchronizing with a remote calendar. Make sure we
always execute the pre-load hook upon reloads, even if the data files
have not been modified.

Fixes GitHub issue #98.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer
2018-05-23 17:52:05 +02:00
parent 2d19605ba8
commit 912124bcdc
2 changed files with 8 additions and 2 deletions

View File

@@ -619,7 +619,11 @@ int main(int argc, char **argv)
config_load();
wins_erase_status_bar();
io_load_keys(conf.pager);
run_hook("pre-load");
io_load_data(NULL);
run_hook("post-load");
io_unset_modified();
wins_slctd_set(conf.default_panel);
wins_resize();