Skip to content

Commit

Permalink
for #232 ensure setting notificaitons to 0 "max" works
Browse files Browse the repository at this point in the history
  • Loading branch information
n8fr8 committed Jan 19, 2018
1 parent 4f0a20d commit b954746
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/org/havenapp/main/service/MonitorService.java
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,14 @@ public synchronized void alert(int alertType, String path) {
mLastEvent.save();
doNotification = true;
}
else
else if (mPrefs.getNotificationTimeMs() > 0 && mLastNotification != null)
{
//check if time window is within configured notification time window
doNotification = !((now.getTime()-mLastNotification.getTime())<mPrefs.getNotificationTimeMs());
doNotification = ((now.getTime()-mLastNotification.getTime())>mPrefs.getNotificationTimeMs());
}
else
{
doNotification = true;
}

EventTrigger eventTrigger = new EventTrigger();
Expand Down

0 comments on commit b954746

Please sign in to comment.