Automatically un-new posts and replies from local Sones.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 8 Jun 2011 13:24:31 +0000 (15:24 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 8 Jun 2011 13:24:31 +0000 (15:24 +0200)
src/main/resources/static/javascript/sone.js

index a489c60..562a744 100644 (file)
@@ -1235,6 +1235,9 @@ function loadNewPost(postId, soneId, recipientId, time) {
                                }
                        });
                        newPost = $(data.post.html).addClass("hidden");
+                       if ($(".post-author-local", newPost).text() == "true") {
+                               newPost.removeClass("new");
+                       }
                        if (firstOlderPost != null) {
                                newPost.insertBefore(firstOlderPost);
                        }
@@ -1268,6 +1271,9 @@ function loadNewReply(replyId, soneId, postId, postSoneId) {
                                        }
                                });
                                newReply = $(data.reply.html).addClass("hidden");
+                               if ($(".reply-author-local", newPost).text() == "true") {
+                                       newPost.removeClass("new");
+                               }
                                if (firstNewerReply != null) {
                                        newReply.insertBefore(firstNewerReply);
                                } else {