diff options
author | 2024-04-13 17:31:14 -0600 | |
---|---|---|
committer | 2024-04-13 17:31:14 -0600 | |
commit | 0337750c523f319d3ddbfc6f34245a8c60e73c57 (patch) | |
tree | 4c4eace8a1e95625d3908f3c3194f24e0b9e6f49 | |
parent | Fix notion calendar login (#529) (diff) | |
download | ferdium-recipes-0337750c523f319d3ddbfc6f34245a8c60e73c57.tar.gz ferdium-recipes-0337750c523f319d3ddbfc6f34245a8c60e73c57.tar.zst ferdium-recipes-0337750c523f319d3ddbfc6f34245a8c60e73c57.zip |
fix: proton mail scheduled emails are shown in unread message badge (#530)
- narrow down selector to grab counter from "inbox" entry
-rw-r--r-- | recipes/proton-mail/package.json | 4 | ||||
-rw-r--r-- | recipes/proton-mail/webview.js | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/recipes/proton-mail/package.json b/recipes/proton-mail/package.json index 715bdad..2f51d75 100644 --- a/recipes/proton-mail/package.json +++ b/recipes/proton-mail/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "proton-mail", | 2 | "id": "proton-mail", |
3 | "name": "ProtonMail", | 3 | "name": "Proton Mail", |
4 | "version": "1.7.0", | 4 | "version": "1.7.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://mail.proton.me/login" | 7 | "serviceURL": "https://mail.proton.me/login" |
diff --git a/recipes/proton-mail/webview.js b/recipes/proton-mail/webview.js index 05db958..56180be 100644 --- a/recipes/proton-mail/webview.js +++ b/recipes/proton-mail/webview.js | |||
@@ -7,9 +7,9 @@ const _path = _interopRequireDefault(require('path')); | |||
7 | module.exports = Ferdium => { | 7 | module.exports = Ferdium => { |
8 | const getMessages = () => { | 8 | const getMessages = () => { |
9 | let unreadCount = 0; | 9 | let unreadCount = 0; |
10 | // Loop over all displayed counters and take the highest one (from the "All Mail" folder) | 10 | // Take the counter element from the "Inbox" folder |
11 | for (const counterElement of document.querySelectorAll( | 11 | for (const counterElement of document.querySelectorAll( |
12 | '.navigation-counter-item', | 12 | '[data-testid="navigation-link:inbox"] [data-testid="navigation-link:unread-count"]', |
13 | )) { | 13 | )) { |
14 | const unreadCounter = Ferdium.safeParseInt(counterElement.textContent); | 14 | const unreadCounter = Ferdium.safeParseInt(counterElement.textContent); |
15 | unreadCount = Math.max(unreadCount, unreadCounter); | 15 | unreadCount = Math.max(unreadCount, unreadCounter); |