From c6acb6191ca558fce121e7df26a8aba88beac2d9 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 30 Nov 2018 19:03:14 -0800 Subject: allow notification filtering by name or addr --- view/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/js') diff --git a/view/js/main.js b/view/js/main.js index 085bc8d0d..f4bfd413b 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -544,7 +544,7 @@ function handleNotificationsItems(notifyType, data) { notify_menu.html(''); $(data).each(function() { - html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass,this.b64mid,this.notify_id,this.thread_top,this.unseen,this.private_forum); + html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.addr,this.message,this.when,this.hclass,this.b64mid,this.notify_id,this.thread_top,this.unseen,this.private_forum); notify_menu.append(html); }); -- cgit v1.2.3 From f13b1e8604746d9e3269f1678ca7ed6d1e7c5b6f Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 2 Dec 2018 09:58:54 +0000 Subject: fix filtering by addr in handleNotificationsItems() (cherry picked from commit f083c0cba10248926661db42d99d04b5eb7579e8) --- view/js/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'view/js') diff --git a/view/js/main.js b/view/js/main.js index f4bfd413b..a69bcfa64 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -558,7 +558,8 @@ function handleNotificationsItems(notifyType, data) { if(filter) { $('#nav-' + notifyType + '-menu .notification').each(function(i, el){ var cn = $(el).data('contact_name').toString().toLowerCase(); - if(cn.indexOf(filter) === -1) + var ca = $(el).data('contact_addr').toString().toLowerCase(); + if(cn.indexOf(filter) === -1 && ca.indexOf(filter) === -1) $(el).addClass('d-none'); else $(el).removeClass('d-none'); -- cgit v1.2.3