From: David ‘Bombe’ Roden Date: Thu, 25 Nov 2010 14:03:59 +0000 (+0100) Subject: Mark a post as known when liking or unliking the post or own of its replies. X-Git-Tag: 0.3.1-RC1~4 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=2beccb575d2baf1d0e9e41acc77fe742b8517ecd;p=Sone.git Mark a post as known when liking or unliking the post or own of its replies. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index d5c4461..32ad683 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -475,10 +475,12 @@ function ajaxifyPost(postElement) { /* convert all “like” buttons to javascript functions. */ $(postElement).find(".like-post").submit(function() { likePost(getPostId(this)); + markPostAsKnown(getPostElement(this)); return false; }); $(postElement).find(".unlike-post").submit(function() { unlikePost(getPostId(this)); + markPostAsKnown(getPostElement(this)); return false; }); @@ -511,10 +513,12 @@ function ajaxifyPost(postElement) { function ajaxifyReply(replyElement) { $(replyElement).find(".like-reply").submit(function() { likeReply(getReplyId(this)); + markPostAsKnown(getPostElement(this)); return false; }); $(replyElement).find(".unlike-reply").submit(function() { unlikeReply(getReplyId(this)); + markPostAsKnown(getPostElement(this)); return false; }); (function(replyElement) {