diff options
author | Abyss777 <abyss@fox5.ru> | 2016-12-05 11:53:35 +0700 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-12-05 11:53:35 +0700 |
commit | effcde41e6f77df3829a9809f48fcc3aed9caade (patch) | |
tree | 070f379e0bcde9ca9df5cce4cde73ea6262d2555 /src/org/traccar/database/NotificationManager.java | |
parent | 6bfda86daaef7ce7b591f2fe1b33ab3b1d5ca2cd (diff) | |
download | trackermap-server-effcde41e6f77df3829a9809f48fcc3aed9caade.tar.gz trackermap-server-effcde41e6f77df3829a9809f48fcc3aed9caade.tar.bz2 trackermap-server-effcde41e6f77df3829a9809f48fcc3aed9caade.zip |
- Ignore attributes in notifications
- Remove extra spaces
Diffstat (limited to 'src/org/traccar/database/NotificationManager.java')
-rw-r--r-- | src/org/traccar/database/NotificationManager.java | 8 |
1 files changed, 3 insertions, 5 deletions
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) { |