Skip to content

Commit b954746

Browse files
committed
for #232 ensure setting notificaitons to 0 "max" works
1 parent 4f0a20d commit b954746

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/java/org/havenapp/main/service/MonitorService.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,14 @@ public synchronized void alert(int alertType, String path) {
270270
mLastEvent.save();
271271
doNotification = true;
272272
}
273-
else
273+
else if (mPrefs.getNotificationTimeMs() > 0 && mLastNotification != null)
274274
{
275275
//check if time window is within configured notification time window
276-
doNotification = !((now.getTime()-mLastNotification.getTime())<mPrefs.getNotificationTimeMs());
276+
doNotification = ((now.getTime()-mLastNotification.getTime())>mPrefs.getNotificationTimeMs());
277+
}
278+
else
279+
{
280+
doNotification = true;
277281
}
278282

279283
EventTrigger eventTrigger = new EventTrigger();

0 commit comments

Comments
 (0)