From a34bd3b013887786f5f958450b4823cfd00cd562 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 17 Jun 2021 11:21:59 +0000 Subject: fix issue where notifications were not loaded if a filter was applied --- view/tpl/messages_widget.tpl | 1 - view/tpl/notifications_widget.tpl | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'view') 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); } -- cgit v1.2.3