Skip to content

Include Marketplace and other unread messages in tray icon number#2133

Merged
dusansimic merged 3 commits into
sindresorhus:mainfrom
mquevill:MoreNotifications
Feb 29, 2024
Merged

Include Marketplace and other unread messages in tray icon number#2133
dusansimic merged 3 commits into
sindresorhus:mainfrom
mquevill:MoreNotifications

Conversation

@mquevill
Copy link
Copy Markdown
Collaborator

This will loop through all the chat categories (Chats, People, Marketplace, Message Requests, Archive) and extract any numbers in its ariaLabel. While I don't expect People or Archive to have unread items, this will still loop through them. This is built off of discussion in #2109 with @stkrknds and @sgtcoder.

Technically, the elementReady() only waits for the first element (Chats), but it still seems to work as expected after startup.

One strange thing: if you have unread Marketplace messages when Caprine starts up, it won't load this number until Marketplace is selected. But this is an issue with Messenger.com itself, not with Caprine.

@sgtcoder
Copy link
Copy Markdown
Contributor

This is awesome. I will test this weekend and also open a PR to have the package.json packages updated.

@dusansimic dusansimic merged commit 35e5eb8 into sindresorhus:main Feb 29, 2024
@mquevill mquevill deleted the MoreNotifications branch December 24, 2025 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants