From effcde41e6f77df3829a9809f48fcc3aed9caade Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Mon, 5 Dec 2016 11:53:35 +0700 Subject: - Ignore attributes in notifications - Remove extra spaces --- src/org/traccar/database/NotificationManager.java | 8 +++----- src/org/traccar/model/Notification.java | 2 -- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/database/NotificationManager.java b/src/org/traccar/database/NotificationManager.java index caf1091cc..ee804f5cd 100644 --- a/src/org/traccar/database/NotificationManager.java +++ b/src/org/traccar/database/NotificationManager.java @@ -131,10 +131,8 @@ public class NotificationManager { Notification cachedNotification = getUserNotificationByType(notification.getUserId(), notification.getType()); if (cachedNotification != null) { if (cachedNotification.getWeb() != notification.getWeb() - || cachedNotification.getMail() != notification.getMail() - || !cachedNotification.getAttributes().equals(notification.getAttributes())) { - if (!notification.getWeb() && !notification.getMail() - && notification.getAttributes().isEmpty()) { + || cachedNotification.getMail() != notification.getMail()) { + if (!notification.getWeb() && !notification.getMail()) { try { dataManager.removeNotification(cachedNotification); } catch (SQLException error) { @@ -164,7 +162,7 @@ public class NotificationManager { } else { notification.setId(cachedNotification.getId()); } - } else if (notification.getWeb() || notification.getMail() || !notification.getAttributes().isEmpty()) { + } else if (notification.getWeb() || notification.getMail()) { try { dataManager.addNotification(notification); } catch (SQLException error) { diff --git a/src/org/traccar/model/Notification.java b/src/org/traccar/model/Notification.java index 3f08c0a39..dd5f66f15 100644 --- a/src/org/traccar/model/Notification.java +++ b/src/org/traccar/model/Notification.java @@ -56,6 +56,4 @@ public class Notification extends Extensible { public void setMail(boolean mail) { this.mail = mail; } - - } -- cgit v1.2.3