From 48b6a16c476a1a5b7cd18f100146bebbac0fe3cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 10 Feb 2016 19:34:42 +0100 Subject: [PATCH] Hand in current version to constructor --- src/main/java/de/todesbaum/jsite/application/UpdateChecker.java | 6 +++--- src/main/java/de/todesbaum/jsite/main/Main.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/todesbaum/jsite/application/UpdateChecker.java b/src/main/java/de/todesbaum/jsite/application/UpdateChecker.java index 24949a9..ce6d96f 100644 --- a/src/main/java/de/todesbaum/jsite/application/UpdateChecker.java +++ b/src/main/java/de/todesbaum/jsite/application/UpdateChecker.java @@ -27,7 +27,6 @@ import java.util.logging.Level; import java.util.logging.Logger; import net.pterodactylus.util.io.Closer; -import de.todesbaum.jsite.main.Main; import de.todesbaum.jsite.main.Version; import de.todesbaum.util.freenet.fcp2.Client; import de.todesbaum.util.freenet.fcp2.ClientGet; @@ -69,7 +68,7 @@ public class UpdateChecker implements Runnable { private int lastUpdateEdition = UPDATE_EDITION; /** Last found version. */ - private Version lastVersion = Main.getVersion(); + private Version lastVersion; /** The freenet interface. */ private final Freenet7Interface freenetInterface; @@ -81,8 +80,9 @@ public class UpdateChecker implements Runnable { * @param freenetInterface * The freenet interface */ - public UpdateChecker(Freenet7Interface freenetInterface) { + public UpdateChecker(Freenet7Interface freenetInterface, Version currentVersion) { this.freenetInterface = freenetInterface; + this.lastVersion = currentVersion; } // diff --git a/src/main/java/de/todesbaum/jsite/main/Main.java b/src/main/java/de/todesbaum/jsite/main/Main.java index 60fb64a..3a0024b 100644 --- a/src/main/java/de/todesbaum/jsite/main/Main.java +++ b/src/main/java/de/todesbaum/jsite/main/Main.java @@ -196,7 +196,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen jSiteIcon = IconLoader.loadIcon("/jsite-icon.png"); wizard.setIcon(jSiteIcon); - updateChecker = new UpdateChecker(freenetInterface); + updateChecker = new UpdateChecker(freenetInterface, getVersion()); updateChecker.addUpdateListener(this); updateChecker.start(); -- 2.7.4