From 83f946f546247572a787d451ca9ec6649c600849 Mon Sep 17 00:00:00 2001 From: Bennett Date: Thu, 13 Feb 2020 13:34:25 +0100 Subject: Update slack: Fix incorrect notification count (#41) * Update slack: Fix incorrect notification count https://github.com/meetfranz/recipe-slack/pull/13 * Revert "Update slack: Fix incorrect notification count" This reverts commit 54d8bad9420198abca55a41123cf110caa7aba02. * Update slack: Fix incorrect notification count https://github.com/meetfranz/recipe-slack/pull/13 * Update slack plugin version * Properly update slack plugin version * Properly update slack version number Co-authored-by: Solomon --- all.json | 2 +- slack.tar.gz | Bin 2513 -> 67291 bytes uncompressed/slack/package.json | 2 +- uncompressed/slack/webview.js | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/all.json b/all.json index d6552e2..fa6e83e 100644 --- a/all.json +++ b/all.json @@ -510,7 +510,7 @@ "featured": false, "id": "slack", "name": "Slack", - "version": "1.0.12", + "version": "1.0.13", "icons": { "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/slack/icon.png", "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/slack/icon.svg" diff --git a/slack.tar.gz b/slack.tar.gz index 3665090..f69df83 100644 Binary files a/slack.tar.gz and b/slack.tar.gz differ diff --git a/uncompressed/slack/package.json b/uncompressed/slack/package.json index ac59dd2..32c038a 100644 --- a/uncompressed/slack/package.json +++ b/uncompressed/slack/package.json @@ -1,7 +1,7 @@ { "id": "slack", "name": "Slack", - "version": "1.0.12", + "version": "1.0.13", "description": "Slack", "main": "index.js", "author": "Stefan Malzner ", diff --git a/uncompressed/slack/webview.js b/uncompressed/slack/webview.js index 174d81c..e64ff4d 100644 --- a/uncompressed/slack/webview.js +++ b/uncompressed/slack/webview.js @@ -41,7 +41,7 @@ const SELECTOR_CHANNELS_UNREAD = '.p-channel_sidebar__channel--unread:not(.p-cha module.exports = Franz => { const getMessages = () => { - const directMessages = document.querySelectorAll(`${SELECTOR_CHANNELS_UNREAD} .p-channel_sidebar__badge, .p-channel_sidebar__link--unread`).length; + const directMessages = document.querySelectorAll(`${SELECTOR_CHANNELS_UNREAD} .p-channel_sidebar__badge, .p-channel_sidebar__link--unread:not([data-sidebar-link-id="Punreads"]`).length; const allMessages = document.querySelectorAll(SELECTOR_CHANNELS_UNREAD).length - directMessages; Franz.setBadge(directMessages, allMessages); }; -- cgit v1.2.3-54-g00ecf