From 7e191c686f6de7cecc3979dbff136e0bf263277d Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Sun, 5 Mar 2017 21:02:07 +0100 Subject: [PATCH] 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 --- VERSION | 2 +- changelog.md | 6 ++---- src/be/nikiroo/fanfix/VersionCheck.java | 14 +++++++++----- 3 files changed, 12 insertions(+), 10 deletions(-) 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()); -- 2.27.0