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>
This commit is contained in:
parent
b7eb9a9e94
commit
a0129d6751
11
src/notify.c
11
src/notify.c
@ -537,11 +537,20 @@ int notify_same_item(time_t time)
|
|||||||
return same;
|
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 notify_same_recur_item(struct recur_apoint *i)
|
||||||
{
|
{
|
||||||
int same = 0;
|
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,
|
recur_item_find_occurrence(i->start, i->dur, &i->exc, i->rpt->type,
|
||||||
i->rpt->freq, i->rpt->until,
|
i->rpt->freq, i->rpt->until,
|
||||||
get_today(), &item_start);
|
get_today(), &item_start);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user