-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: proton mail scheduled emails are shown in unread message badge (#…
…530) - narrow down selector to grab counter from "inbox" entry
- Loading branch information
Showing
2 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0337750
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I was annoyed for so long to have Ferdium displaying the "All Mail" folder count instead of Inbox's... Just dug into it, and eventually understood I only had to update the recipe thanks to your changes.
However, I wonder whether some Ferdium users may not be happy with this update as it does not include unread count from custom folders anymore, i.e. if you have a mail filter automatically moving given incoming emails to a custom folder, those would not be displayed as unread messages in Ferdium badge anymore. I fall under this case, but only showing the Inbox folder's unread count has nevertheless been so far exactly what I was after.
I don't need it for now, but a more complex future implementation to have the best of all worlds could be something like having in Ferdium's service's settings a list of folder in which could be selected those to include and compute the sum of their respective counter (or substract from All Mail?). I list below for reference the selectors that might be useful for this if they have not changed until then.
document.querySelectorAll('[data-testid="navigation-link:almost-all-mail"] [data-testid="navigation-link:unread-count"]')[0].textContent;
document.querySelectorAll('[data-testid="navigation-link:inbox"] [data-testid="navigation-link:unread-count"]')[0].textContent;
document.querySelectorAll('[data-testid="sidebar-label:My Custom Folder"] [data-testid="navigation-link:unread-count"]')[0].textContent;