Fix one-second warning period for notifications

Adresses GitHub issue #204, the interactive part.

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lars Henriksen 2019-04-02 22:33:24 +02:00 committed by Lukas Fleischer
parent d9aea39713
commit a5d8ca5cbf
2 changed files with 2 additions and 2 deletions

View File

@ -188,7 +188,7 @@ void dmon_start(int parent_exit_status)
DMON_ABRT(_("error loading next appointment\n"));
left = notify_time_left();
if (left > 0 && left < nbar.cntdwn
if (left > 0 && left <= nbar.cntdwn
&& notify_needs_reminder()) {
DMON_LOG(_("launching notification at %s for: \"%s\"\n"),
nowstr(), notify_app_txt());

View File

@ -285,7 +285,7 @@ void notify_update_bar(void)
hours_left * HOURINSEC) / MININSEC;
pthread_mutex_lock(&nbar.mutex);
blinking = time_left < nbar.cntdwn && notify_trigger();
blinking = time_left <= nbar.cntdwn && notify_trigger();
WINS_NBAR_LOCK;
if (blinking)