Merge branch 'release-0.9.6'
[Sone.git] / src / main / java / net / pterodactylus / sone / core / SoneInserter.java
index 45c617c..26135ea 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - SoneInserter.java - Copyright © 2010–2013 David Roden
+ * Sone - SoneInserter.java - Copyright © 2010–2016 David Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -180,7 +180,7 @@ public class SoneInserter extends AbstractService {
         * @return The fingerprint of the last insert
         */
        public String getLastInsertFingerprint() {
-               return soneModificationDetector.getOriginalFingerprint();
+               return soneModificationDetector.getLastInsertFingerprint();
        }
 
        /**
@@ -307,7 +307,7 @@ public class SoneInserter extends AbstractService {
                        soneProperties.put("time", currentTimeMillis());
                        soneProperties.put("requestUri", sone.getRequestUri());
                        soneProperties.put("profile", sone.getProfile());
-                       soneProperties.put("posts", Ordering.from(Post.TIME_COMPARATOR).sortedCopy(sone.getPosts()));
+                       soneProperties.put("posts", Ordering.from(Post.NEWEST_FIRST).sortedCopy(sone.getPosts()));
                        soneProperties.put("replies", Ordering.from(Reply.TIME_COMPARATOR).reverse().sortedCopy(sone.getReplies()));
                        soneProperties.put("likedPostIds", new HashSet<String>(sone.getLikedPostIds()));
                        soneProperties.put("likedReplyIds", new HashSet<String>(sone.getLikedReplyIds()));
@@ -393,7 +393,7 @@ public class SoneInserter extends AbstractService {
                        templateContext.set("core", core);
                        templateContext.set("currentSone", soneProperties);
                        templateContext.set("currentEdition", core.getUpdateChecker().getLatestEdition());
-                       templateContext.set("version", SonePlugin.VERSION);
+                       templateContext.set("version", SonePlugin.getPluginVersion());
                        StringWriter writer = new StringWriter();
                        try {
                                template.render(templateContext, writer);