From 35bd6e426dd8596bb7eefad416ba7e542205e329 Mon Sep 17 00:00:00 2001 From: Ashish Dobani Date: Tue, 15 Oct 2024 15:47:46 +0530 Subject: [PATCH] fix(yahoo-mail): update badge to 0 when all mail is read (#599) --- recipes/yahoo-mail/package.json | 2 +- recipes/yahoo-mail/webview.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/recipes/yahoo-mail/package.json b/recipes/yahoo-mail/package.json index 56a493c33..7887859c9 100644 --- a/recipes/yahoo-mail/package.json +++ b/recipes/yahoo-mail/package.json @@ -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", diff --git a/recipes/yahoo-mail/webview.js b/recipes/yahoo-mail/webview.js index fc74834e9..25509251a 100644 --- a/recipes/yahoo-mail/webview.js +++ b/recipes/yahoo-mail/webview.js @@ -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); };