Return local Sones from core and web interface.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / SoneTemplatePage.java
index fa2798e..506fc15 100644 (file)
@@ -25,6 +25,7 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
+import net.pterodactylus.sone.data.LocalSone;
 import net.pterodactylus.sone.data.Sone;
 import net.pterodactylus.sone.main.SonePlugin;
 import net.pterodactylus.sone.notify.ListNotificationFilters;
@@ -138,7 +139,7 @@ public class SoneTemplatePage extends FreenetTemplatePage {
         * @return The currently logged in Sone, or {@code null} if no Sone is
         *         currently logged in
         */
-       protected Optional<Sone> getCurrentSone(ToadletContext toadletContext) {
+       protected Optional<LocalSone> getCurrentSone(ToadletContext toadletContext) {
                return webInterface.getCurrentSone(toadletContext);
        }
 
@@ -153,7 +154,7 @@ public class SoneTemplatePage extends FreenetTemplatePage {
         * @return The currently logged in Sone, or {@code null} if no Sone is
         *         currently logged in
         */
-       protected Optional<Sone> getCurrentSone(ToadletContext toadletContext, boolean create) {
+       protected Optional<LocalSone> getCurrentSone(ToadletContext toadletContext, boolean create) {
                return webInterface.getCurrentSone(toadletContext, create);
        }
 
@@ -224,7 +225,7 @@ public class SoneTemplatePage extends FreenetTemplatePage {
        @Override
        protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
                super.processTemplate(request, templateContext);
-               Optional<Sone> currentSone = getCurrentSone(request.getToadletContext(), false);
+               Optional<LocalSone> currentSone = getCurrentSone(request.getToadletContext(), false);
                templateContext.set("core", webInterface.getCore());
                templateContext.set("currentSone", currentSone.orNull());
                templateContext.set("localSones", webInterface.getCore().getLocalSones());