From: David ‘Bombe’ Roden Date: Sat, 16 Apr 2011 11:20:10 +0000 (+0200) Subject: Do not insert posts if we’re not on the first page of a pagination. X-Git-Tag: 0.6.2^2~11^2~1 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=be545f41a8fcaf98c63920fd38770ded27e875b3 Do not insert posts if we’re not on the first page of a pagination. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index db08197..84208f4 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -1203,7 +1203,7 @@ function loadNewPost(postId, soneId, recipientId, time) { if (hasPost(postId)) { return; } - if (!isIndexPage()) { + if (!isIndexPage() || (getPage(".pagination-index") > 1)) { if (!isViewPostPage() || (getShownPostId() != postId)) { if (!isViewSonePage() || ((getShownSoneId() != soneId) && (getShownSoneId() != recipientId))) { return; @@ -1218,7 +1218,7 @@ function loadNewPost(postId, soneId, recipientId, time) { if (hasPost(data.post.id)) { return; } - if (!isIndexPage() && !(isViewSonePage() && ((getShownSoneId() == data.post.sone) || (getShownSoneId() == data.post.recipient)))) { + if ((!isIndexPage() || (getPage(".pagination-index") > 1)) && !(isViewSonePage() && ((getShownSoneId() == data.post.sone) || (getShownSoneId() == data.post.recipient)))) { return; } var firstOlderPost = null;