import java.net.URLEncoder;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
templateContext.set("latestVersion", webInterface.getCore().getUpdateChecker().getLatestVersion());
templateContext.set("latestVersionTime", webInterface.getCore().getUpdateChecker().getLatestVersionDate());
List<Notification> notifications = ListNotificationFilters.filterNotifications(webInterface.getNotifications().getNotifications(), currentSone);
+ Collections.sort(notifications, Notification.CREATED_TIME_SORTER);
templateContext.set("notifications", notifications);
templateContext.set("notificationHash", HashCode.hashCode(notifications));
}
import java.io.IOException;
import java.io.StringWriter;
import java.util.Collection;
+import java.util.Collections;
import java.util.List;
import net.pterodactylus.sone.data.Sone;
Sone currentSone = getCurrentSone(request.getToadletContext(), false);
Collection<Notification> notifications = webInterface.getNotifications().getNotifications();
List<Notification> 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) {