Skip to content

Commit

Permalink
fix: proton mail scheduled emails are shown in unread message badge
Browse files Browse the repository at this point in the history
- narrow down selector to grab counter from "inbox" entry
  • Loading branch information
mcmxcdev committed Apr 13, 2024
1 parent 099f029 commit c0f8a29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions recipes/proton-mail/package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions recipes/proton-mail/webview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c0f8a29

Please sign in to comment.