From 209958a58434ba7740f762ed2026e04254edbf9c Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 3 Oct 2011 09:39:41 +0200 Subject: [PATCH] move call to ping before call to update_* --- js/main.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/js/main.js b/js/main.js index e0694e47f0..430f216d14 100644 --- a/js/main.js +++ b/js/main.js @@ -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); }