From 6ec110091beafed8e80b28de43ef08e80dc92455 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 26 Jan 2011 07:30:36 +0100 Subject: [PATCH] Store and propagate the latest edition, too. --- .../java/net/pterodactylus/sone/core/Core.java | 4 ++-- .../net/pterodactylus/sone/core/CoreListener.java | 4 +++- .../sone/core/CoreListenerManager.java | 8 ++++--- .../net/pterodactylus/sone/core/UpdateChecker.java | 25 +++++++++++++++++----- .../pterodactylus/sone/core/UpdateListener.java | 4 +++- .../sone/core/UpdateListenerManager.java | 6 ++++-- .../pterodactylus/sone/web/SoneTemplatePage.java | 1 + .../net/pterodactylus/sone/web/WebInterface.java | 2 +- 8 files changed, 39 insertions(+), 15 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 364b9f1..99a119b 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -1771,8 +1771,8 @@ public class Core implements IdentityListener, UpdateListener { * {@inheritDoc} */ @Override - public void updateFound(Version version, long releaseTime) { - coreListenerManager.fireUpdateFound(version, releaseTime); + public void updateFound(Version version, long releaseTime, long latestEdition) { + coreListenerManager.fireUpdateFound(version, releaseTime, latestEdition); } } diff --git a/src/main/java/net/pterodactylus/sone/core/CoreListener.java b/src/main/java/net/pterodactylus/sone/core/CoreListener.java index 5fbb333..fb83c9f 100644 --- a/src/main/java/net/pterodactylus/sone/core/CoreListener.java +++ b/src/main/java/net/pterodactylus/sone/core/CoreListener.java @@ -135,7 +135,9 @@ public interface CoreListener extends EventListener { * The version that was found * @param releaseTime * The release time of the new version + * @param latestEdition + * The latest edition of the Sone homepage */ - public void updateFound(Version version, long releaseTime); + public void updateFound(Version version, long releaseTime, long latestEdition); } diff --git a/src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java b/src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java index 4fc9532..6dbdc58 100644 --- a/src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java +++ b/src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java @@ -201,15 +201,17 @@ public class CoreListenerManager extends AbstractListenerManager