Mark local elements as known from the core, not from the client.
[Sone.git] / src / main / resources / static / javascript / sone.js
index 0cc6480..d5db8ef 100644 (file)
@@ -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,11 +1239,6 @@ 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);