X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FKnownSonesPage.java;h=52b7273c5746e5958ff3ba60eda37c541edfd525;hb=40e866b397b00588c0e4a4388dbfe670d1746680;hp=01271724216ad23adf55d17c280c68fe6c6d4f5b;hpb=ccd98b291f132395ad87b2ff65d98d8237184be1;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/KnownSonesPage.java b/src/main/java/net/pterodactylus/sone/web/KnownSonesPage.java index 0127172..52b7273 100644 --- a/src/main/java/net/pterodactylus/sone/web/KnownSonesPage.java +++ b/src/main/java/net/pterodactylus/sone/web/KnownSonesPage.java @@ -17,6 +17,11 @@ package net.pterodactylus.sone.web; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import net.pterodactylus.sone.data.Sone; import net.pterodactylus.util.template.Template; /** @@ -35,7 +40,7 @@ public class KnownSonesPage extends SoneTemplatePage { * The Sone web interface */ public KnownSonesPage(Template template, WebInterface webInterface) { - super("knownSones.html", template, "Page.KnownSones.Title", webInterface); + super("knownSones.html", template, "Page.KnownSones.Title", webInterface, false); } // @@ -48,7 +53,9 @@ public class KnownSonesPage extends SoneTemplatePage { @Override protected void processTemplate(Request request, Template template) throws RedirectException { super.processTemplate(request, template); - template.set("knownSones", webInterface.core().getKnownSones()); + List knownSones = new ArrayList(webInterface.core().getSones()); + Collections.sort(knownSones, Sone.NICE_NAME_COMPARATOR); + template.set("knownSones", knownSones); } }