Reset to version 1.4.1, fix update checks
authorNiki Roo <niki@nikiroo.be>
Sun, 5 Mar 2017 20:02:07 +0000 (21:02 +0100)
committerNiki Roo <niki@nikiroo.be>
Sun, 5 Mar 2017 20:02:07 +0000 (21:02 +0100)
- 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
changelog.md
src/be/nikiroo/fanfix/VersionCheck.java

diff --git a/VERSION b/VERSION
index 9df886c42a1e2082f1471383d986fea4d531f8ac..347f5833ee6db7495cce808040501bf2c96269a9 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.4.2
+1.4.1
index 7ddb1559bb96e337f24d8f596fe682a6c562a4d2..ab2f31b178be50555b3313787e54deb82e23e6f3 100644 (file)
@@ -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
index 3359bacbce41b977a6a7ee9daf089a02a8331e61..3f63bf5e8819621eabe3c4ebb9e0a022647d8778 100644 (file)
@@ -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<String>());
+                                                       } else {
+                                                               version = new Version();
                                                        }
-                                               } else if (!newer.isEmpty() && !line.isEmpty()) {
-                                                       Version version = newer.get(newer.size() - 1);
-                                                       List<String> ch = changes.get(version);
+                                               } else if (!version.isEmpty() && !newer.isEmpty()
+                                                               && !line.isEmpty()) {
+                                                       List<String> 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());