aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/proton-mail/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/proton-mail/webview.js')
-rw-r--r--recipes/proton-mail/webview.js4
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'));
7module.exports = Ferdium => { 7module.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);