From 59e6989cbcc90ae13eb175e4f1730a9c9d4fc6cd Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 18 Nov 2022 10:43:33 +0000 Subject: hq widget: implement thread unseen items count --- view/js/main.js | 6 ++++-- view/tpl/messages_widget.tpl | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'view') diff --git a/view/js/main.js b/view/js/main.js index aff6eab4d..c409eed35 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -197,8 +197,7 @@ $(document).ready(function() { if (singlethread_modules.indexOf(module) !== -1) { history.pushState(stateObj, '', module + '/' + b64mid); - $('.message').removeClass('active'); - $('[data-b64mid="' + b64mid + '"].message').addClass('active'); + } if (b64mid) { @@ -207,6 +206,9 @@ $(document).ready(function() { if(! page_load) { prepareLiveUpdate(b64mid, notify_id); + $('.message').removeClass('active'); + $('[data-b64mid="' + b64mid + '"].message').addClass('active'); + $('[data-b64mid="' + b64mid + '"].message .badge').remove(); } } } diff --git a/view/tpl/messages_widget.tpl b/view/tpl/messages_widget.tpl index ddb21beb5..90f8e13c7 100644 --- a/view/tpl/messages_widget.tpl +++ b/view/tpl/messages_widget.tpl @@ -36,6 +36,7 @@
{2}
{3} + {8}
@@ -52,6 +53,9 @@
{{$e.summary}}
{{$e.info}} + {{if $e.unseen}} + {{$e.unseen}} + {{/if}} {{/foreach}}