Mark click area as known when the post is marked as known. Fixes #52.
[Sone.git] / src / main / resources / static / javascript / sone.js
index cd34ed2..c11c436 100644 (file)
@@ -716,9 +716,9 @@ function loadNewPost(postId, soneId, recipientId, time) {
                                return;
                        }
                }
-               if (getPostTime($("#sone .post").last()) > time) {
-                       return;
-               }
+       }
+       if (getPostTime($("#sone .post").last()) > time) {
+               return;
        }
        $.getJSON("getPost.ajax", { "post" : postId }, function(data, textStatus) {
                if ((data != null) && data.success) {
@@ -793,6 +793,7 @@ function markPostAsKnown(postElements) {
                        (function(postElement) {
                                $.getJSON("markPostAsKnown.ajax", {"formPassword": getFormPassword(), "post": getPostId(postElement)}, function(data, textStatus) {
                                        $(postElement).removeClass("new");
+                                       $(".click-to-show", postElement).removeClass("new");
                                });
                        })(postElement);
                }