Mark a post and all its replies as known if a comment is added.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 25 Nov 2010 12:49:55 +0000 (13:49 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 25 Nov 2010 12:49:55 +0000 (13:49 +0100)
src/main/resources/static/javascript/sone.js

index 6cb227c..956b3df 100644 (file)
@@ -454,6 +454,8 @@ function ajaxifyPost(postElement) {
                postReply(postId, text, function(success, error, replyId) {
                        if (success) {
                                loadNewReply(replyId);
+                               markPostAsKnown(postElement);
+                               markReplyAsKnown($(postElement).find(".reply"));
                                $("#sone .post#" + postId + " .create-reply").addClass("hidden");
                        } else {
                                alert(error);