Merge commit '0.3.1-RC3' into next
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 26 Nov 2010 19:09:12 +0000 (20:09 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 26 Nov 2010 19:09:12 +0000 (20:09 +0100)
pom.xml
src/main/java/net/pterodactylus/sone/main/SonePlugin.java
src/main/resources/static/javascript/sone.js

diff --git a/pom.xml b/pom.xml
index 003b20d..38c02b2 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -2,7 +2,7 @@
        <modelVersion>4.0.0</modelVersion>
        <groupId>net.pterodactylus</groupId>
        <artifactId>sone</artifactId>
-       <version>0.3.1-RC2</version>
+       <version>0.3.1-RC3</version>
        <dependencies>
                <dependency>
                        <groupId>net.pterodactylus</groupId>
index 756da15..ff14193 100644 (file)
@@ -79,7 +79,7 @@ public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10
        }
 
        /** The version. */
-       public static final Version VERSION = new Version("RC2", 0, 3, 1);
+       public static final Version VERSION = new Version("RC3", 0, 3, 1);
 
        /** The logger. */
        private static final Logger logger = Logging.getLogger(SonePlugin.class);
index 7d7bcb5..ba78d2c 100644 (file)
@@ -611,10 +611,6 @@ function loadNewPost(postId) {
        loadedPosts[postId] = true;
        $.getJSON("ajax/getPost.ajax", { "post" : postId }, function(data, textStatus) {
                if ((data != null) && data.success) {
-                       /* maybe weird timing stuff ensues. */
-                       if (data.post.id in loadedPosts) {
-                               return;
-                       }
                        var firstOlderPost = null;
                        $("#sone .post").each(function() {
                                if (getPostTime(this) < data.post.time) {
@@ -622,6 +618,7 @@ function loadNewPost(postId) {
                                        return false;
                                }
                        });
+                       newPost = $(data.post.html).addClass("hidden");
                        if (firstOlderPost != null) {
                                newPost.insertBefore(firstOlderPost);
                        } else {
@@ -642,10 +639,6 @@ function loadNewReply(replyId) {
        $.getJSON("ajax/getReply.ajax", { "reply": replyId }, function(data, textStatus) {
                /* find post. */
                if ((data != null) && data.success) {
-                       /* maybe weird timing stuff ensues. */
-                       if (data.reply.id in loadedReplies) {
-                               return;
-                       }
                        $("#sone .post#" + data.reply.postId).each(function() {
                                var firstNewerReply = null;
                                $(this).find(".replies .reply").each(function() {
@@ -654,6 +647,7 @@ function loadNewReply(replyId) {
                                                return false;
                                        }
                                });
+                               newReply = $(data.reply.html).addClass("hidden");
                                if (firstNewerReply != null) {
                                        newReply.insertBefore(firstNewerReply);
                                } else {