aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Niklas Neesen <niklas.neesen@enghouse.com>2020-07-07 09:38:30 +0200
committerLibravatar Niklas Neesen <niklas.neesen@enghouse.com>2020-07-07 09:38:30 +0200
commit415f15f113ed7076a8dc585d4241100bf496b1f0 (patch)
tree93a8a04209ff2ec256b5440d412ce03002886108
parentUpdate repository (diff)
downloadferdium-recipes-415f15f113ed7076a8dc585d4241100bf496b1f0.tar.gz
ferdium-recipes-415f15f113ed7076a8dc585d4241100bf496b1f0.tar.zst
ferdium-recipes-415f15f113ed7076a8dc585d4241100bf496b1f0.zip
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 c2a1dd8..faa2fc6 100644
--- a/all.json
+++ b/all.json
@@ -565,7 +565,7 @@
565 "featured": true, 565 "featured": true,
566 "id": "mattermost", 566 "id": "mattermost",
567 "name": "Mattermost", 567 "name": "Mattermost",
568 "version": "1.2.1", 568 "version": "1.2.2",
569 "icons": { 569 "icons": {
570 "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/mattermost/icon.png", 570 "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/mattermost/icon.png",
571 "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/mattermost/icon.svg" 571 "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};