diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-11-28 16:06:07 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-11-28 16:06:07 +0100 |
commit | 455720ae938126d9a0d3c728beb0a7ba3268a4d0 (patch) | |
tree | 75c13e3872e885b47454c820806992eb0c4b9d07 /view/js/main.js | |
parent | 8073be87da589a1cb24a186a04ea7b7dd21ff055 (diff) | |
download | volse-hubzilla-455720ae938126d9a0d3c728beb0a7ba3268a4d0.tar.gz volse-hubzilla-455720ae938126d9a0d3c728beb0a7ba3268a4d0.tar.bz2 volse-hubzilla-455720ae938126d9a0d3c728beb0a7ba3268a4d0.zip |
check for updateCountsOnly in NavUpdate()
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/view/js/main.js b/view/js/main.js index 354684521..91a64631a 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -375,7 +375,11 @@ function NavUpdate() { window.location.href=window.location.href; } - liveUpdateInit(); + if(! updateCountsOnly) { + liveUpdateInit(); + } + + updateCountsOnly = false; if(data.network || data.home || data.intros || data.register || data.mail || data.all_events || data.notify || data.files || data.pubs) { $('.notifications-btn').css('opacity', 1); @@ -677,26 +681,22 @@ function collapseHeight() { } function liveUpdateInit() { - if(! updateCountsOnly) { - // start live update - - if($('#live-network').length) { src = 'network'; liveUpdate(); } - if($('#live-channel').length) { src = 'channel'; liveUpdate(); } - if($('#live-pubstream').length) { src = 'pubstream'; liveUpdate(); } - if($('#live-display').length) { src = 'display'; liveUpdate(); } - if($('#live-hq').length) { src = 'hq'; liveUpdate(); } - if($('#live-search').length) { src = 'search'; liveUpdate(); } - // if($('#live-cards').length) { src = 'cards'; liveUpdate(); } - // if($('#live-articles').length) { src = 'articles'; liveUpdate(); } - - if($('#live-photos').length || $('#live-cards').length || $('#live-articles').length ) { - if(liking) { - liking = 0; - window.location.href=window.location.href; - } + // start live update + if($('#live-network').length) { src = 'network'; liveUpdate(); } + if($('#live-channel').length) { src = 'channel'; liveUpdate(); } + if($('#live-pubstream').length) { src = 'pubstream'; liveUpdate(); } + if($('#live-display').length) { src = 'display'; liveUpdate(); } + if($('#live-hq').length) { src = 'hq'; liveUpdate(); } + if($('#live-search').length) { src = 'search'; liveUpdate(); } + // if($('#live-cards').length) { src = 'cards'; liveUpdate(); } + // if($('#live-articles').length) { src = 'articles'; liveUpdate(); } + + if($('#live-photos').length || $('#live-cards').length || $('#live-articles').length ) { + if(liking) { + liking = 0; + window.location.href=window.location.href; } } - updateCountsOnly = false; } function liveUpdate() { |