From: Fabio Comuni Date: Fri, 11 Nov 2011 16:00:05 +0000 (+0100) Subject: js: start liveupdate after ping returns to stop continuos welcome message X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=25b972bee2a708ab794cabf44f54163eb2edc787;p=friendica.git js: start liveupdate after ping returns to stop continuos welcome message As liveupdate start before ping but returns after, it overwrite session edit by ping, restoring already shown and deleted notices and infos --- diff --git a/js/main.js b/js/main.js index 15c5b5d1f1..9832b2cbc5 100644 --- a/js/main.js +++ b/js/main.js @@ -168,28 +168,35 @@ function NavUpdate() { - if($('#live-network').length) { src = 'network'; liveUpdate(); } - if($('#live-profile').length) { src = 'profile'; liveUpdate(); } - if($('#live-community').length) { src = 'community'; liveUpdate(); } - if($('#live-notes').length) { src = 'notes'; liveUpdate(); } - if($('#live-display').length) { - if(liking) { - liking = 0; - window.location.href=window.location.href - } - } - if($('#live-photos').length) { - if(liking) { - liking = 0; - window.location.href=window.location.href - } - } - if(! stopped) { $.get("ping",function(data) { $(data).find('result').each(function() { // send nav-update event $('nav').trigger('nav-update', this); + + + // start live update + + if($('#live-network').length) { src = 'network'; liveUpdate(); } + if($('#live-profile').length) { src = 'profile'; liveUpdate(); } + if($('#live-community').length) { src = 'community'; liveUpdate(); } + if($('#live-notes').length) { src = 'notes'; liveUpdate(); } + if($('#live-display').length) { + if(liking) { + liking = 0; + window.location.href=window.location.href + } + } + if($('#live-photos').length) { + if(liking) { + liking = 0; + window.location.href=window.location.href + } + } + + + + }); }) ; }