aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Bennett <hello@vantezzen.io>2020-07-19 20:48:42 +0200
committerLibravatar GitHub <noreply@github.com>2020-07-19 20:48:42 +0200
commit47e72b30c29d07ceadb84e85acfe4a820e54372e (patch)
tree52b453a14ef3ca93cb90fcbe9110c7d20f9c725f
parentMerge pull request #235 from omove/master (diff)
parentFix badge for unread channels when in single team (diff)
downloadferdium-recipes-47e72b30c29d07ceadb84e85acfe4a820e54372e.tar.gz
ferdium-recipes-47e72b30c29d07ceadb84e85acfe4a820e54372e.tar.zst
ferdium-recipes-47e72b30c29d07ceadb84e85acfe4a820e54372e.zip
Merge pull request #230 from CrEaK/mattermost-fix
Mattermost: Fix badge for unread channels when in single team
-rw-r--r--all.json2
-rw-r--r--archives/mattermost.tar.gzbin69829 -> 69612 bytes
-rw-r--r--uncompressed/mattermost/package.json2
-rw-r--r--uncompressed/mattermost/webview.js5
4 files changed, 5 insertions, 4 deletions
diff --git a/all.json b/all.json
index 3dbba52..43bf40f 100644
--- a/all.json
+++ b/all.json
@@ -576,7 +576,7 @@
576 "featured": true, 576 "featured": true,
577 "id": "mattermost", 577 "id": "mattermost",
578 "name": "Mattermost", 578 "name": "Mattermost",
579 "version": "1.2.1", 579 "version": "1.2.2",
580 "icons": { 580 "icons": {
581 "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/mattermost/icon.png", 581 "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/mattermost/icon.png",
582 "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/mattermost/icon.svg" 582 "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/mattermost/icon.svg"
diff --git a/archives/mattermost.tar.gz b/archives/mattermost.tar.gz
index ede16d1..7bf21f0 100644
--- a/archives/mattermost.tar.gz
+++ b/archives/mattermost.tar.gz
Binary files differ
diff --git a/uncompressed/mattermost/package.json b/uncompressed/mattermost/package.json
index 48f6860..52a1908 100644
--- a/uncompressed/mattermost/package.json
+++ b/uncompressed/mattermost/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "mattermost", 2 "id": "mattermost",
3 "name": "Mattermost", 3 "name": "Mattermost",
4 "version": "1.2.1", 4 "version": "1.2.2",
5 "description": "Mattermost", 5 "description": "Mattermost",
6 "main": "index.js", 6 "main": "index.js",
7 "author": "Stefan Malzner <stefan@adlk.io>", 7 "author": "Stefan Malzner <stefan@adlk.io>",
diff --git a/uncompressed/mattermost/webview.js b/uncompressed/mattermost/webview.js
index 03258e0..f348da4 100644
--- a/uncompressed/mattermost/webview.js
+++ b/uncompressed/mattermost/webview.js
@@ -4,10 +4,11 @@ module.exports = Franz => {
4 const getMessages = function getMessages() { 4 const getMessages = function getMessages() {
5 const directMessages = document.querySelectorAll('.sidebar--left .has-badge .badge').length; 5 const directMessages = document.querySelectorAll('.sidebar--left .has-badge .badge').length;
6 const allMessages = document.querySelectorAll('.sidebar--left .has-badge').length - directMessages; 6 const allMessages = document.querySelectorAll('.sidebar--left .has-badge').length - directMessages;
7 const channelMessages = document.querySelectorAll('.sidebar--left .unread-title').length - allMessages;
7 const teamDirectMessages = document.querySelectorAll('.team-wrapper .team-container .badge').length; 8 const teamDirectMessages = document.querySelectorAll('.team-wrapper .team-container .badge').length;
8 const teamMessages = document.querySelectorAll('.team-wrapper .unread').length - teamDirectMessages; 9 const teamMessages = document.querySelectorAll('.team-wrapper .unread').length - teamDirectMessages;
9 Franz.setBadge(directMessages + teamDirectMessages, allMessages + teamMessages); 10 Franz.setBadge(directMessages + teamDirectMessages, allMessages + channelMessages + teamMessages);
10 }; 11 };
11 12
12 Franz.loop(getMessages); 13 Franz.loop(getMessages);
13}; \ No newline at end of file 14};