From e406822f17cde24887e779450b8ca8995d5b7f57 Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Fri, 16 Jun 2017 21:10:31 +0500 Subject: [PATCH] add reset of new DMs counter on click on the show-new-twists button inside mentions' modal --- js/interface_common.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/js/interface_common.js b/js/interface_common.js index 25d2296..c15f353 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -2752,9 +2752,13 @@ function initInterfaceCommon() { $('.userMenu-favs a').on('click', openFavsModal); $('.favs-from-user').on('click', openFavsModal); - $('#hashtag-modal-template .postboard-news').on('click', function () { - $(this).hide(); - displayQueryPending($('.hashtag-modal .postboard-posts')); + $('#hashtag-modal-template .postboard-news').on('click', function (event) { + var elem = $(event.target).hide().closest('.postboard').find('.postboard-posts'); + + displayQueryPending(elem); + + if (elem.attr('data-request-id') === defaultScreenName + '@mention') + resetMentionsCount(); }); getElem('.latest-activity', true).on('mouseup',