aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/tpl/messages_widget.tpl1
-rw-r--r--view/tpl/notifications_widget.tpl7
2 files changed, 5 insertions, 3 deletions
diff --git a/view/tpl/messages_widget.tpl b/view/tpl/messages_widget.tpl
index 079bcdf3a..d3dbd7be9 100644
--- a/view/tpl/messages_widget.tpl
+++ b/view/tpl/messages_widget.tpl
@@ -97,7 +97,6 @@
}).done(function(obj) {
get_messages_page_active = false;
messages_offset = obj.offset;
- console.log(obj);
let html;
let tpl = $('#messages-template[rel=template]').html();
obj.entries.forEach(function(e) {
diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl
index 0d922e416..54008b397 100644
--- a/view/tpl/notifications_widget.tpl
+++ b/view/tpl/notifications_widget.tpl
@@ -154,6 +154,10 @@
else {
$('#nav-{{$notification.type}}-menu .notification[data-thread_top=false]').addClass('tt-filter-active');
$(this).addClass('active sticky-top');
+ // load more notifications if visible notifications count is low
+ if(sse_type && sse_offset != -1 && $('#nav-' + sse_type + '-menu').children(':visible').length < 15) {
+ sse_bs_notifications(sse_type, false, true);
+ }
}
});
@@ -330,8 +334,7 @@
}
// load more notifications if visible notifications count becomes low
- if(sse_type && sse_offset != -1 && $('#nav-' + sse_type + '-menu').children().length < 15) {
- sse_offset = 0;
+ if(sse_type && sse_offset != -1 && $('#nav-' + sse_type + '-menu').children(':visible').length < 15) {
sse_bs_notifications(sse_type, false, true);
}