aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-06-17 11:21:59 +0000
committerMario <mario@mariovavti.com>2021-06-17 11:21:59 +0000
commita34bd3b013887786f5f958450b4823cfd00cd562 (patch)
tree9ac08a4034b210d19675ae1be91f4bd91ca334a7
parentc268bc327a9c82acf05999039b0b3ab7191646eb (diff)
downloadvolse-hubzilla-a34bd3b013887786f5f958450b4823cfd00cd562.tar.gz
volse-hubzilla-a34bd3b013887786f5f958450b4823cfd00cd562.tar.bz2
volse-hubzilla-a34bd3b013887786f5f958450b4823cfd00cd562.zip
fix issue where notifications were not loaded if a filter was applied
-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);
}