From: David ‘Bombe’ Roden Date: Mon, 6 Jun 2011 04:11:20 +0000 (+0200) Subject: Only insert posts on the first page of the “view Sone” page. X-Git-Tag: 0.6.5^2~13 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=bf43e7c07d8f244f3415600ebb3d74765777b705 Only insert posts on the first page of the “view Sone” page. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 60a6a0b..a489c60 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -1211,7 +1211,7 @@ function loadNewPost(postId, soneId, recipientId, time) { } if (!isIndexPage() || (getPage(".pagination-index") > 1)) { if (!isViewPostPage() || (getShownPostId() != postId)) { - if (!isViewSonePage() || ((getShownSoneId() != soneId) && (getShownSoneId() != recipientId))) { + if (!isViewSonePage() || ((getShownSoneId() != soneId) && (getShownSoneId() != recipientId)) || (getPage(".post-navigation") > 1)) { return; } } @@ -1224,7 +1224,7 @@ function loadNewPost(postId, soneId, recipientId, time) { if (hasPost(data.post.id)) { return; } - if ((!isIndexPage() || (getPage(".pagination-index") > 1)) && !(isViewSonePage() && ((getShownSoneId() == data.post.sone) || (getShownSoneId() == data.post.recipient)))) { + if ((!isIndexPage() || (getPage(".pagination-index") > 1)) && !(isViewSonePage() && ((getShownSoneId() == data.post.sone) || (getShownSoneId() == data.post.recipient) || (getPage(".post-navigation") > 1)))) { return; } var firstOlderPost = null;