From 285f6feea43be782edc6233b709d47b146250361 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Tue, 19 Sep 2017 15:07:51 +0500 Subject: Rename sent flags --- src/org/traccar/database/NotificationManager.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/org/traccar/database') diff --git a/src/org/traccar/database/NotificationManager.java b/src/org/traccar/database/NotificationManager.java index a6ca0ea66..73041a23f 100644 --- a/src/org/traccar/database/NotificationManager.java +++ b/src/org/traccar/database/NotificationManager.java @@ -62,26 +62,26 @@ public class NotificationManager extends ExtendedObjectManager { for (long userId : users) { if (event.getGeofenceId() == 0 || Context.getGeofenceManager() != null && Context.getGeofenceManager().checkItemPermission(userId, event.getGeofenceId())) { - boolean webSent = false; - boolean mailSent = false; - boolean smsSent = Context.getSmppManager() == null; + boolean sentWeb = false; + boolean sentMail = false; + boolean sentSms = Context.getSmppManager() == null; for (long notificationId : getEffectiveNotifications(userId, deviceId)) { Notification notification = getById(notificationId); if (getById(notificationId).getType().equals(event.getType())) { - if (!webSent && notification.getWeb()) { + if (!sentWeb && notification.getWeb()) { Context.getConnectionManager().updateEvent(userId, event); - webSent = true; + sentWeb = true; } - if (!mailSent && notification.getMail()) { + if (!sentMail && notification.getMail()) { NotificationMail.sendMailAsync(userId, event, position); - mailSent = true; + sentMail = true; } - if (!smsSent && notification.getSms()) { + if (!sentSms && notification.getSms()) { NotificationSms.sendSmsAsync(userId, event, position); - smsSent = true; + sentSms = true; } } - if (webSent && mailSent && smsSent) { + if (sentWeb && sentMail && sentSms) { break; } } -- cgit v1.2.3