X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=dd3330831f7e58f5cddaf3bee7b88a83188e3e6e;hb=a7e65e23d6dae37ebf88ba5a0eb58239205c7e2e;hp=375fc53abe883414aeec772479369352248e330c;hpb=723a7eb494e3833334bd4800f7e3b3a7ba290d10;p=Sone.git diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 375fc53..dd33308 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -1079,8 +1079,10 @@ function loadNotifications(notificationIds) { oldNotification.replaceWith(notification.show()); } else { $("#sone #notification-area").append(notification); - notification.slideDown(); - setActivity(); + if (value.id.substring(0, 5) != "local") { + notification.slideDown(); + setActivity(); + } } }); }); @@ -1237,6 +1239,11 @@ function loadNewPost(postId, soneId, recipientId, time) { newPost = $(data.post.html).addClass("hidden"); if ($(".post-author-local", newPost).text() == "true") { newPost.removeClass("new"); + (function(newPost) { + setTimeout(function() { + markPostAsKnown(newPost, false); + }, 5000); + })(newPost); } if (firstOlderPost != null) { newPost.insertBefore(firstOlderPost); @@ -1271,8 +1278,13 @@ function loadNewReply(replyId, soneId, postId, postSoneId) { } }); newReply = $(data.reply.html).addClass("hidden"); - if ($(".reply-author-local", newPost).text() == "true") { - newPost.removeClass("new"); + if ($(".reply-author-local", newReply).text() == "true") { + newReply.removeClass("new"); + (function(newReply) { + setTimeout(function() { + markReplyAsKnown(newReply, false); + }, 5000); + })(newReply); } if (firstNewerReply != null) { newReply.insertBefore(firstNewerReply);