Skip to content

Commit

Permalink
fix(yahoo-mail): update badge to 0 when all mail is read (#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
dobaniashish authored Oct 15, 2024
1 parent 78c1e71 commit 35bd6e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion recipes/yahoo-mail/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "yahoo-mail",
"name": "Yahoo Mail",
"version": "1.3.1",
"version": "1.3.2",
"license": "MIT",
"config": {
"serviceURL": "https://mail.yahoo.com",
Expand Down
8 changes: 5 additions & 3 deletions recipes/yahoo-mail/webview.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ const _path = _interopRequireDefault(require('path'));

module.exports = Ferdium => {
const getMessages = () => {
const count = document.querySelector(
'a[data-test-folder-name="Inbox"] span[data-test-id="displayed-count"]',
).textContent;
const count = Ferdium.safeParseInt(
document.querySelector(
'a[data-test-folder-name="Inbox"] span[data-test-id="displayed-count"]',
)?.textContent,
);
Ferdium.setBadge(count);
};

Expand Down

0 comments on commit 35bd6e4

Please sign in to comment.