]> git.mxchange.org Git - friendica.git/commitdiff
js: start liveupdate after ping returns to stop continuos welcome message
authorFabio Comuni <fabrix.xm@gmail.com>
Fri, 11 Nov 2011 16:00:05 +0000 (17:00 +0100)
committerFabio Comuni <fabrix.xm@gmail.com>
Fri, 11 Nov 2011 16:00:05 +0000 (17:00 +0100)
As liveupdate start before ping but returns after, it overwrite session
edit by ping, restoring already shown and deleted notices and infos

js/main.js

index 15c5b5d1f19ec643b0311ca87f1c760d9763c83e..9832b2cbc560b12f7469a7abc06a0037b01841f3 100644 (file)
 
        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 
+                                               }
+                                       }
+
+                                       
+                                       
+                                       
                                });
                        }) ;
                }