From: Niki Roo Date: Sun, 5 Mar 2017 20:02:07 +0000 (+0100) Subject: Reset to version 1.4.1, fix update checks X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=7e191c686f6de7cecc3979dbff136e0bf263277d;p=fanfix-jexer.git Reset to version 1.4.1, fix update checks - ignore previous versions 1.4.1 and 1.4.2, they have been cancelled - Fix UpdateChecker which showed the changes of ALL versions instead of the newer ones only --- diff --git a/VERSION b/VERSION index 9df886c..347f583 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.2 +1.4.1 diff --git a/changelog.md b/changelog.md index 7ddb155..ab2f31b 100644 --- a/changelog.md +++ b/changelog.md @@ -1,11 +1,9 @@ # Fanfix -## Version 1.4.2 - -- Fix for images documents which were not working any more - ## Version 1.4.1 +- Fix UpdateChecker which showed the changes of ALL versions instead of the newer ones only +- Fix for images documents which were not working any more - Fix some bad line breaks on HTML supports (including FanFiction.net) - UI: progress bar now working correctly - nikiroo-utils update to show all steps in the progress bars diff --git a/src/be/nikiroo/fanfix/VersionCheck.java b/src/be/nikiroo/fanfix/VersionCheck.java index 3359bac..3f63bf5 100644 --- a/src/be/nikiroo/fanfix/VersionCheck.java +++ b/src/be/nikiroo/fanfix/VersionCheck.java @@ -107,18 +107,22 @@ public class VersionCheck { BufferedReader reader = new BufferedReader( new InputStreamReader(in, "UTF-8")); try { + Version version = new Version(); for (String line = reader.readLine(); line != null; line = reader .readLine()) { if (line.startsWith("## Version ")) { - String v = line.substring("## Version ".length()); - Version version = new Version(v); + version = new Version(line.substring("## Version " + .length())); if (version.isNewerThan(current)) { newer.add(version); changes.put(version, new ArrayList()); + } else { + version = new Version(); } - } else if (!newer.isEmpty() && !line.isEmpty()) { - Version version = newer.get(newer.size() - 1); - List ch = changes.get(version); + } else if (!version.isEmpty() && !newer.isEmpty() + && !line.isEmpty()) { + List ch = changes.get(newer.get(newer + .size() - 1)); if (!ch.isEmpty() && !line.startsWith("- ")) { int i = ch.size() - 1; ch.set(i, ch.get(i) + " " + line.trim());