aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/onmail
diff options
context:
space:
mode:
authorLibravatar Edmundo Sanchez <zomundo@gmail.com>2022-10-17 09:49:41 -0500
committerLibravatar GitHub <noreply@github.com>2022-10-17 14:49:41 +0000
commitaa244f76cb03f9e10e3657503abb1bf5f6475fbb (patch)
treeba82bd4344e777823f7c4c263d7cc920da577f9f /recipes/onmail
parentFix getting badge count on messenger (#145) (diff)
downloadferdium-recipes-aa244f76cb03f9e10e3657503abb1bf5f6475fbb.tar.gz
ferdium-recipes-aa244f76cb03f9e10e3657503abb1bf5f6475fbb.tar.zst
ferdium-recipes-aa244f76cb03f9e10e3657503abb1bf5f6475fbb.zip
Fix: Unread count stays at 1 when all emails are read (#178)
- Element that contains the unread count dissapears when count is zero. - Added that scenario to reset th ecount to zero and send it to the badge Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
Diffstat (limited to 'recipes/onmail')
-rw-r--r--recipes/onmail/package.json2
-rw-r--r--recipes/onmail/webview.js4
2 files changed, 4 insertions, 2 deletions
diff --git a/recipes/onmail/package.json b/recipes/onmail/package.json
index 70b7e11..fd48d51 100644
--- a/recipes/onmail/package.json
+++ b/recipes/onmail/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "onmail", 2 "id": "onmail",
3 "name": "onMail", 3 "name": "onMail",
4 "version": "1.0.0", 4 "version": "1.0.1",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://mail.onmail.com" 7 "serviceURL": "https://mail.onmail.com"
diff --git a/recipes/onmail/webview.js b/recipes/onmail/webview.js
index 8565d76..9e881f4 100644
--- a/recipes/onmail/webview.js
+++ b/recipes/onmail/webview.js
@@ -10,7 +10,9 @@ module.exports = Ferdium => {
10 const inboxLinks = document.querySelectorAll('p.truncate'); 10 const inboxLinks = document.querySelectorAll('p.truncate');
11 for (const label of inboxLinks){ 11 for (const label of inboxLinks){
12 if (label.textContent) { 12 if (label.textContent) {
13 countImportant = Ferdium.safeParseInt(label.nextSibling.textContent); 13 let inbox_count = label.nextSibling
14 countImportant = inbox_count == null ? 0 : Ferdium.safeParseInt(inbox_count.textContent);
15
14 break; 16 break;
15 } 17 }
16 } 18 }