diff options
author | Victor B <39555268+victorbnl@users.noreply.github.com> | 2023-07-18 17:15:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-18 20:45:29 +0530 |
commit | fd169b7b2ad80abce5b044909d5234f0ea6a1c27 (patch) | |
tree | 8e53bb63b33c5f45eed5751efc43869404d52956 | |
parent | add bradreeve as a contributor for code (#386) [skip ci] (diff) | |
download | ferdium-recipes-fd169b7b2ad80abce5b044909d5234f0ea6a1c27.tar.gz ferdium-recipes-fd169b7b2ad80abce5b044909d5234f0ea6a1c27.tar.zst ferdium-recipes-fd169b7b2ad80abce5b044909d5234f0ea6a1c27.zip |
Fix WhatsApp count (#390)
-rw-r--r-- | recipes/whatsapp/package.json | 2 | ||||
-rw-r--r-- | recipes/whatsapp/webview.js | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/recipes/whatsapp/package.json b/recipes/whatsapp/package.json index 790b914..88a7e30 100644 --- a/recipes/whatsapp/package.json +++ b/recipes/whatsapp/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "whatsapp", | 2 | "id": "whatsapp", |
3 | "name": "WhatsApp", | 3 | "name": "WhatsApp", |
4 | "version": "3.4.10", | 4 | "version": "3.4.11", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://web.whatsapp.com", | 7 | "serviceURL": "https://web.whatsapp.com", |
diff --git a/recipes/whatsapp/webview.js b/recipes/whatsapp/webview.js index ad1b372..e2496be 100644 --- a/recipes/whatsapp/webview.js +++ b/recipes/whatsapp/webview.js | |||
@@ -39,10 +39,10 @@ module.exports = Ferdium => { | |||
39 | query.onsuccess = (event) => { | 39 | query.onsuccess = (event) => { |
40 | for (const chat of event.target.result) { | 40 | for (const chat of event.target.result) { |
41 | if (chat.unreadCount > 0) { | 41 | if (chat.unreadCount > 0) { |
42 | if (chat.muteExpiration === 0 && chat.archive === false) { | 42 | if (chat.muteExpiration > 0 || chat.isAutoMuted) { |
43 | unreadCount += chat.unreadCount; | ||
44 | } else { | ||
45 | unreadMutedCount += chat.unreadCount; | 43 | unreadMutedCount += chat.unreadCount; |
44 | } else { | ||
45 | unreadCount += chat.unreadCount; | ||
46 | } | 46 | } |
47 | } | 47 | } |
48 | } | 48 | } |