aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/main.js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-11-29 19:46:13 +0000
committerMario <mario@mariovavti.com>2019-11-29 19:46:13 +0000
commitc1aa96ebf70fd5b6426d96bf7d7e771dfc4ca9ab (patch)
tree3dd72390a6b7598ed3f6d034b9c2a2f3a8b9a588 /view/js/main.js
parent17e012afc62904b625a01f61415a9e370392dd25 (diff)
downloadvolse-hubzilla-c1aa96ebf70fd5b6426d96bf7d7e771dfc4ca9ab.tar.gz
volse-hubzilla-c1aa96ebf70fd5b6426d96bf7d7e771dfc4ca9ab.tar.bz2
volse-hubzilla-c1aa96ebf70fd5b6426d96bf7d7e771dfc4ca9ab.zip
sse: template fixes, fix missing forum notifications and minor impovements
Diffstat (limited to 'view/js/main.js')
-rw-r--r--view/js/main.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 043718839..8dd9d5b80 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -722,6 +722,8 @@ function updateConvItems(mode,data) {
if(followUpPageLoad)
sse_bs_counts();
+ else
+ sse_bs_init();
// reset rotators and cursors we may have set before reaching this place
@@ -870,7 +872,9 @@ function updateInit() {
if(src) {
liveUpdate();
}
- sse_bs_init();
+ else {
+ sse_bs_init();
+ }
if($('#live-photos').length || $('#live-cards').length || $('#live-articles').length ) {
if(liking) {
@@ -1672,18 +1676,16 @@ function sse_bs_notifications(e, replace, followup) {
function sse_handleNotifications(obj, replace, followup) {
var primary_notifications = ['home', 'intros', 'register', 'mail', 'notify', 'files'];
- var secondary_notifications = ['network', 'all_events', 'pubs'];
+ var secondary_notifications = ['network', 'forums', 'all_events', 'pubs'];
var all_notifications = primary_notifications.concat(secondary_notifications);
all_notifications.forEach(function(type, index) {
if(obj[type] && obj[type].count) {
$('.' + type + '-button').fadeIn();
-
if(replace || followup)
$('.' + type + '-update').html(Number(obj[type].count));
else
$('.' + type + '-update').html(Number(obj[type].count) + Number($('.' + type + '-update').html()));
-
}
if(obj[type] && obj[type].notifications.length)
sse_handleNotificationsItems(type, obj[type].notifications, replace, followup);
@@ -1780,8 +1782,9 @@ function sse_updateNotifications(type, mid, interactive) {
sse_setNotificationsStatus();
});
}
- else
+ else {
$('.' + type + '-update').html(count);
+ }
if(! interactive)
return true;
@@ -1794,7 +1797,7 @@ function sse_updateNotifications(type, mid, interactive) {
function sse_setNotificationsStatus() {
var primary_notifications = ['home', 'intros', 'register', 'mail', 'notify', 'files'];
- var secondary_notifications = ['network', 'all_events', 'pubs'];
+ var secondary_notifications = ['network', 'forums', 'all_events', 'pubs'];
var all_notifications = primary_notifications.concat(secondary_notifications);
var primary_available = false;