js: start liveupdate after ping returns to stop continuos welcome message
As liveupdate start before ping but returns after, it overwrite session edit by ping, restoring already shown and deleted notices and infos
This commit is contained in:
17
js/main.js
17
js/main.js
@@ -168,6 +168,15 @@
|
||||
|
||||
function NavUpdate() {
|
||||
|
||||
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(); }
|
||||
@@ -185,11 +194,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
if(! stopped) {
|
||||
$.get("ping",function(data) {
|
||||
$(data).find('result').each(function() {
|
||||
// send nav-update event
|
||||
$('nav').trigger('nav-update', this);
|
||||
|
||||
|
||||
|
||||
});
|
||||
}) ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user