Simplify apoint_switch_notify()

Pull out code from apoint_switch_notify() -- especially the fallback
routine that calls recur_apoint_switch_notify() if the currently
selected item is a recurrent item -- and move it to a wrapper function
day_item_switch_notify().

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer
2012-06-25 22:30:20 +02:00
parent b97c2a09cf
commit 0504875219
4 changed files with 19 additions and 24 deletions

View File

@@ -311,7 +311,7 @@ int main(int argc, char **argv)
case KEY_FLAG_ITEM:
if (wins_slctd() == APP && apoint_hilt() != 0) {
apoint_switch_notify();
day_item_switch_notify();
inday = do_storage(0);
wins_update(FLAG_APP);
} else if (wins_slctd() == TOD && todo_hilt() != 0) {