diff options
author | Lars Henriksen <LarsHenriksen@get2net.dk> | 2019-12-11 09:57:02 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@calcurse.org> | 2019-12-23 13:16:39 -0500 |
commit | a0129d67510f60fadbd272252624a352f5c9f8b6 (patch) | |
tree | e56d63d3d5e9eedbf6c7f3d782609172b5d85d91 | |
parent | b7eb9a9e941ea5e8bae7ca652fb6f16993eba30c (diff) | |
download | calcurse-a0129d67510f60fadbd272252624a352f5c9f8b6.tar.gz calcurse-a0129d67510f60fadbd272252624a352f5c9f8b6.zip |
Fix next recurrent appointment deleted
If the notify bar displays a recurrent appointment after midnight as next
upcoming appointment, the bar is not updated when the appointment/occurrence is
deleted. The problem is not seen in 4.3.0 because of the bug described in
commit 8cbd456, Fix next recurring appointment. The problem and the solution is
the same, this time in the function notify_same_recur_item().
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
-rw-r--r-- | src/notify.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/notify.c b/src/notify.c index 334468b..549a2be 100644 --- a/src/notify.c +++ b/src/notify.c @@ -537,11 +537,20 @@ int notify_same_item(time_t time) return same; } +/* + * Check if an occurrence of a recurrent appointment is currently the "next + * upcoming appointment" in the notify bar. + */ int notify_same_recur_item(struct recur_apoint *i) { int same = 0; - time_t item_start = 0; + time_t item_start; + /* Tomorrow? */ + recur_item_find_occurrence(i->start, i->dur, &i->exc, i->rpt->type, + i->rpt->freq, i->rpt->until, + NEXTDAY(get_today()), &item_start); + /* Today? */ recur_item_find_occurrence(i->start, i->dur, &i->exc, i->rpt->type, i->rpt->freq, i->rpt->until, get_today(), &item_start); |