Mark a post and all its replies as known if a comment is added.
[Sone.git] / 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);