Also react correctly on a “view Sone” page.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 13 Jan 2011 14:04:35 +0000 (15:04 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 13 Jan 2011 14:04:35 +0000 (15:04 +0100)
src/main/resources/static/javascript/sone.js

index dd7b749..70d124e 100644 (file)
@@ -710,8 +710,12 @@ function loadNewPost(postId, soneId, recipientId) {
        if (hasPost(postId)) {
                return;
        }
-       if (!isIndexPage() && (!isViewPostPage() || (getShownPostId() != postId))) {
-               return;
+       if (!isIndexPage()) {
+               if (!isViewPostPage() || (getShownPostId() != postId)) {
+                       if (!isViewSonePage() || ((getShownSoneId() != soneId) && (getShownSoneId() != recipientId))) {
+                               return;
+                       }
+               }
        }
        $.getJSON("getPost.ajax", { "post" : postId }, function(data, textStatus) {
                if ((data != null) && data.success) {