From 0337750c523f319d3ddbfc6f34245a8c60e73c57 Mon Sep 17 00:00:00 2001 From: MCMXC <16797721+mcmxcdev@users.noreply.github.com> Date: Sat, 13 Apr 2024 17:31:14 -0600 Subject: fix: proton mail scheduled emails are shown in unread message badge (#530) - narrow down selector to grab counter from "inbox" entry --- recipes/proton-mail/package.json | 4 ++-- 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 @@ { "id": "proton-mail", - "name": "ProtonMail", - "version": "1.7.0", + "name": "Proton Mail", + "version": "1.7.1", "license": "MIT", "config": { "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')); module.exports = Ferdium => { const getMessages = () => { let unreadCount = 0; - // Loop over all displayed counters and take the highest one (from the "All Mail" folder) + // Take the counter element from the "Inbox" folder for (const counterElement of document.querySelectorAll( - '.navigation-counter-item', + '[data-testid="navigation-link:inbox"] [data-testid="navigation-link:unread-count"]', )) { const unreadCounter = Ferdium.safeParseInt(counterElement.textContent); unreadCount = Math.max(unreadCount, unreadCounter); -- cgit v1.2.3-54-g00ecf