aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-11-11 17:00:05 +0100
committerFabio Comuni <fabrix.xm@gmail.com>2011-11-11 17:00:05 +0100
commit25b972bee2a708ab794cabf44f54163eb2edc787 (patch)
treedecf12bc1bba9ebdbbbeff90e884f06fa6ced520
parent20217c04f086479fd5fb50bacb2e5e98977fc137 (diff)
downloadvolse-hubzilla-25b972bee2a708ab794cabf44f54163eb2edc787.tar.gz
volse-hubzilla-25b972bee2a708ab794cabf44f54163eb2edc787.tar.bz2
volse-hubzilla-25b972bee2a708ab794cabf44f54163eb2edc787.zip
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
-rw-r--r--js/main.js41
1 files changed, 24 insertions, 17 deletions
diff --git a/js/main.js b/js/main.js
index 15c5b5d1f..9832b2cbc 100644
--- a/js/main.js
+++ b/js/main.js
@@ -168,28 +168,35 @@
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
+ }
+ }
+
+
+
+
});
}) ;
}