X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FGetStatusAjaxPage.java;h=8657a6a97060f27a51a8336996ce86759392b99d;hp=25c87133113e2b26a6e2ae9be1c01258028805bc;hb=274784c1ae880b7cdc2bb7cf31d75e4092ec5653;hpb=06ae2e6649e61e3e3bff71690caa0e98e4ac01ba diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java index 25c8713..8657a6a 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java @@ -36,7 +36,6 @@ import net.pterodactylus.sone.web.page.FreenetRequest; import net.pterodactylus.util.json.JsonArray; import net.pterodactylus.util.json.JsonObject; import net.pterodactylus.util.notify.Notification; -import net.pterodactylus.util.object.HashCode; import com.google.common.base.Predicate; import com.google.common.collect.Collections2; @@ -89,7 +88,6 @@ public class GetStatusAjaxPage extends JsonPage { /* load notifications. */ List notifications = ListNotificationFilters.filterNotifications(webInterface.getNotifications().getNotifications(), currentSone); Collections.sort(notifications, Notification.CREATED_TIME_SORTER); - int notificationHash = HashCode.hashCode(notifications); /* load new posts. */ Collection newPosts = webInterface.getNewPosts(); if (currentSone != null) { @@ -140,7 +138,7 @@ public class GetStatusAjaxPage extends JsonPage { jsonReply.put("postSone", reply.getPost().getSone().getId()); jsonReplies.add(jsonReply); } - return createSuccessJsonObject().put("loggedIn", currentSone != null).put("options", createJsonOptions(currentSone)).put("sones", jsonSones).put("notificationHash", notificationHash).put("newPosts", jsonPosts).put("newReplies", jsonReplies); + return createSuccessJsonObject().put("loggedIn", currentSone != null).put("options", createJsonOptions(currentSone)).put("sones", jsonSones).put("notificationHash", notifications.hashCode()).put("newPosts", jsonPosts).put("newReplies", jsonReplies); } /**