X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FGetNotificationsAjaxPage.java;h=6573ddacf23b76fb289ca072923aebb3ad0c1ad6;hp=d4be6bef641082a03f776d01a75be037a67cf07b;hb=274784c1ae880b7cdc2bb7cf31d75e4092ec5653;hpb=06ae2e6649e61e3e3bff71690caa0e98e4ac01ba diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.java index d4be6be..6573dda 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.java @@ -32,7 +32,6 @@ import net.pterodactylus.util.json.JsonArray; import net.pterodactylus.util.json.JsonObject; import net.pterodactylus.util.notify.Notification; import net.pterodactylus.util.notify.TemplateNotification; -import net.pterodactylus.util.object.HashCode; import net.pterodactylus.util.template.TemplateContext; /** @@ -81,12 +80,11 @@ public class GetNotificationsAjaxPage extends JsonPage { Collection notifications = webInterface.getNotifications().getNotifications(); List filteredNotifications = ListNotificationFilters.filterNotifications(notifications, currentSone); Collections.sort(filteredNotifications, Notification.CREATED_TIME_SORTER); - int notificationHash = HashCode.hashCode(filteredNotifications); JsonArray jsonNotifications = new JsonArray(); for (Notification notification : filteredNotifications) { jsonNotifications.add(createJsonNotification(request, notification)); } - return createSuccessJsonObject().put("notificationHash", notificationHash).put("notifications", jsonNotifications).put("options", createJsonOptions(currentSone)); + return createSuccessJsonObject().put("notificationHash", filteredNotifications.hashCode()).put("notifications", jsonNotifications).put("options", createJsonOptions(currentSone)); } //