From 155195c529bc5486628028d81eac7bdfa0f2646d Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Tue, 11 Apr 2017 10:20:54 +0200 Subject: [PATCH] hopefully fixes qvitter getting stuck loading newer on error (e.g. connection going down) --- js/qvitter.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/js/qvitter.js b/js/qvitter.js index 9372476..c454eea 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -2156,10 +2156,9 @@ function checkForNewQueets() { if(window.loggedIn && (window.currentStreamObject.type == 'notices' || window.currentStreamObject.type == 'notifications')) { var lastId = $('#feed-body').children('.stream-item').not('.temp-post').not('.posted-from-form').attr('data-quitter-id-in-stream'); var addThisStream = window.currentStreamObject.stream; - var timeNow = new Date().getTime(); getFromAPI(addThisStream + qOrAmp(window.currentStreamObject.stream) + 'since_id=' + lastId,function(data){ + $('body').removeClass('loading-newer'); if(data) { - $('body').removeClass('loading-newer'); if(addThisStream == window.currentStreamObject.stream) { addToFeed(data, false, 'hidden'); @@ -2179,7 +2178,6 @@ function checkForNewQueets() { } } - /* · · · Show hidden queets when user clicks on new-queets-bar