diff options
author | 2024-04-13 17:31:14 -0600 | |
---|---|---|
committer | 2024-04-13 17:31:14 -0600 | |
commit | 0337750c523f319d3ddbfc6f34245a8c60e73c57 (patch) | |
tree | 4c4eace8a1e95625d3908f3c3194f24e0b9e6f49 /recipes/proton-mail/webview.js | |
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
Diffstat (limited to 'recipes/proton-mail/webview.js')
-rw-r--r-- | recipes/proton-mail/webview.js | 4 |
1 files changed, 2 insertions, 2 deletions
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); |