From ce4b99e2a56f33b30478ca4b9a2743c6234478ea Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 19 Jan 2015 15:41:52 +0100 Subject: [PATCH] Duplicate items appeared when scrolling to bottom of feed At least on the "notifications" feed page many users on quitter.es reported that their notifications were duplicated when scrolling down. It appears that qvitter.js fetches notices but does not check which notices were already there, so I did a quick fix and set the feed to only fetch notices which had a max_id of the last item _minus one_. max_id is inclusive in GNU social. --- js/qvitter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/qvitter.js b/js/qvitter.js index 5009cc2..98c94e3 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -1051,7 +1051,7 @@ $(window).scroll(function() { } // normal streams else { - var getVars = qOrAmp(window.currentStream) + 'max_id=' + $('#feed-body').children('.stream-item').last().attr('data-quitter-id-in-stream'); + var getVars = qOrAmp(window.currentStream) + 'max_id=' + ($('#feed-body').children('.stream-item').last().attr('data-quitter-id-in-stream')-1); } display_spinner('#footer-spinner-container');