diff options
author | Mario <mario@mariovavti.com> | 2019-11-23 13:33:46 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-11-23 13:33:46 +0000 |
commit | fb65c541234cf9e3ff0f3ebea0ec4f5e593f7e0a (patch) | |
tree | f64c6b95caae0949924264047686205aa966cb8d /view/js | |
parent | fe803135d85c07f1ccf14326d9bd87661d89f3f3 (diff) | |
download | volse-hubzilla-fb65c541234cf9e3ff0f3ebea0ec4f5e593f7e0a.tar.gz volse-hubzilla-fb65c541234cf9e3ff0f3ebea0ec4f5e593f7e0a.tar.bz2 volse-hubzilla-fb65c541234cf9e3ff0f3ebea0ec4f5e593f7e0a.zip |
sse: minor improvements
Diffstat (limited to 'view/js')
-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(); |