move call to ping before call to update_*

This commit is contained in:
Fabio Comuni 2011-10-03 09:39:41 +02:00
parent 4d5580ab77
commit 209958a584

View file

@ -164,6 +164,15 @@
});
function NavUpdate() {
if(! stopped) {
$.get("ping",function(data) {
$(data).find('result').each(function() {
// send nav-update event
$('nav').trigger('nav-update', this);
});
}) ;
}
if($('#live-network').length) { src = 'network'; liveUpdate(); }
if($('#live-profile').length) { src = 'profile'; liveUpdate(); }
@ -182,14 +191,6 @@
}
}
if(! stopped) {
$.get("ping",function(data) {
$(data).find('result').each(function() {
// send nav-update event
$('nav').trigger('nav-update', this);
});
}) ;
}
timer = setTimeout(NavUpdate,30000);
}