Store and propagate the latest edition, too.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / WebInterface.java
index 13c7157..67a3952 100644 (file)
@@ -309,6 +309,10 @@ public class WebInterface implements CoreListener {
         *         currently logged in
         */
        public Sone getCurrentSone(ToadletContext toadletContext, boolean create) {
+               Set<Sone> localSones = getCore().getLocalSones();
+               if (localSones.size() == 1) {
+                       return localSones.iterator().next();
+               }
                return getCurrentSone(getCurrentSession(toadletContext, create));
        }
 
@@ -761,7 +765,7 @@ public class WebInterface implements CoreListener {
         * {@inheritDoc}
         */
        @Override
-       public void updateFound(Version version, long releaseTime) {
+       public void updateFound(Version version, long releaseTime, long latestEdition) {
                newVersionNotification.getTemplateContext().set("version", version);
                newVersionNotification.getTemplateContext().set("releaseTime", releaseTime);
                notificationManager.addNotification(newVersionNotification);