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
1 changed files with 9 additions and 8 deletions

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);
}