diff options
-rw-r--r-- | view/js/main.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/view/js/main.js b/view/js/main.js index 1df8dc9eb..8b153a555 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -140,13 +140,15 @@ $(document).ready(function() { $.get('/sse_bs/' + sse_type + '/' + sse_offset + '?nquery=' + encodeURIComponent(cn_val), function(obj) { console.log('sse: bootstraping ' + sse_type); console.log(obj); - sse_handleNotifications(obj, true, false); + sse_bs_active = false; sse_partial_result = true; sse_offset = obj[sse_type].offset; if(sse_offset < 0) $("#nav-" + sse_type + "-loading").hide(); + sse_handleNotifications(obj, true, false); + }); } }); @@ -160,13 +162,15 @@ $(document).ready(function() { $.get('/sse_bs/' + sse_type, function(obj) { console.log('sse: bootstraping ' + sse_type); console.log(obj); - sse_handleNotifications(obj, true, false); + sse_bs_active = false; sse_partial_result = false; sse_offset = obj[sse_type].offset; if(sse_offset < 0) $("#nav-" + sse_type + "-loading").hide(); + sse_handleNotifications(obj, true, false); + }); }); @@ -1866,12 +1870,14 @@ function sse_bs_notifications(e, replace, followup) { $.get('/sse_bs/' + sse_type + '/' + sse_offset + '?nquery=' + encodeURIComponent(cn_val), function(obj) { console.log('sse: bootstraping ' + sse_type); console.log(obj); - sse_handleNotifications(obj, replace, followup); + sse_bs_active = false; sse_offset = obj[sse_type].offset; if(sse_offset < 0) $("#nav-" + sse_type + "-loading").hide(); + sse_handleNotifications(obj, replace, followup); + }); } else @@ -2131,8 +2137,7 @@ function sse_updateNotifications(type, mid, interactive) { var count = Number($('.' + type + '-update').html()); - if(count > 0) - count--; + count--; if(count < 1) { $('.' + type + '-button').fadeOut(); |