]> git.mxchange.org Git - friendica.git/commitdiff
move call to ping before call to update_*
authorFabio Comuni <fabrix.xm@gmail.com>
Mon, 3 Oct 2011 07:39:41 +0000 (09:39 +0200)
committerFabio Comuni <fabrix.xm@gmail.com>
Mon, 3 Oct 2011 07:39:41 +0000 (09:39 +0200)
js/main.js

index e0694e47f067b5f6684f6320dbbfc6e259e6678a..430f216d148203b905e8d3c3d7f309672f40a824 100644 (file)
        });
 
        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(); }
                        }
                }
 
-               if(! stopped) {
-                       $.get("ping",function(data) {
-                               $(data).find('result').each(function() {
-                                       // send nav-update event
-                                       $('nav').trigger('nav-update', this);
-                               });
-                       }) ;
-               }
                timer = setTimeout(NavUpdate,30000);
        }