Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications: add badge dot to the system tray icon when there is a new or unread message. #291

Open
ShGKme opened this issue Aug 11, 2023 · 8 comments
Labels
0. Needs triage enhancement New feature or request

Comments

@ShGKme
Copy link
Contributor

ShGKme commented Aug 11, 2023

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.

There is a notification about a new message and taskbar icon badge. But when the window is closed and the notification is closed, it is not visible that some notification is missed.

Describe the solution you'd like

Add a badge dot to the tray system tray icon when there is a new or unread message.

Describe alternatives you've considered

Currently, we have a badge about a new notification similar to * in the title on web-client. But it could be more useful to have a badge about unread mentions.

The difference is that the current badge appears only on a notification and disappears on window/tab activating. While usually such badges are shown when there are any unread mentions, no matter if the window is open or it is an old message.

Additional context

Discord example:

image

@ecker00
Copy link

ecker00 commented Oct 9, 2023

There is a notification about a new message and taskbar icon badge.

I don't see this working at the moment in the Task Bar? Installed version from a few days ago.

Example, I have unread messages in Talk but no badge in the taskbar, compared to Discord and Mattermost.

image

@benjamindahl
Copy link

benjamindahl commented Nov 1, 2023

Same issue in macOS 12.6.
Would also love to see message count
Bildschirmfoto 2023-11-01 um 11 30 29
Bildschirmfoto 2023-11-01 um 11 30 38

@xataxxx
Copy link

xataxxx commented Apr 22, 2024

It seems all the pieces are already in place to fix this.
In my dev machine I could easily get it to work by moving this setBadgeCount line in notifications.store.js:

// If we didn't already highlight, store the title so we can restore on tab-view
if (!document.title.startsWith('* ')) {
	window.TALK_DESKTOP.setBadgeCount()
	document.title = '* ' + document.title
}

to

// If we didn't already highlight, store the title so we can restore on tab-view
window.TALK_DESKTOP.setBadgeCount()
if (!document.title.startsWith('* ')) {
	document.title = '* ' + document.title
}

But I'm new to nextcloud so not sure I tested it thoroughly enough to know if this would break something.
If any of the devs could confirm this might be safe I can do a pull-request.

@ShGKme ShGKme changed the title Notifications: add badge dot to the tray system tray icon when there is a new or unread message. Notifications: add badge dot to the system tray icon when there is a new or unread message. Apr 23, 2024
@ShGKme
Copy link
Contributor Author

ShGKme commented Apr 23, 2024

@xataxxx the original issue is a bit more complex. It is about showing a permanent marker depending on the number of all unread chats/mentions.

This badge is only used to notify the user about new notifications when the window is minimized (to the taskbar, not to the system tray).

Besides, I don't see what this proposal changes. The badge and the * Title are always set and reset together. Do you know a scenario where the title doesn't start with * Title but there should be a badge? If yes, then it should be fixed in place with incorrect title change as well.

@fitus85
Copy link

fitus85 commented Apr 23, 2024

This badge is only used to notify the user about new notifications when the window is minimized (to the taskbar, not to the system tray).

The badge seems to be not working on Win 11 at the moment.
I could not see any change on the taskbar icon when a new message arrives while app is minimized to taskbar.

New message do not arrive immediately, they are not loaded until the windows comes back to focus (click on symbol in taskbar).
Windows Notifications about new msg are also shown delayed.

Maybe this has to do with Talk Version 18.0.4 on the server side, Desk client is 0.29?

@ShGKme
Copy link
Contributor Author

ShGKme commented Apr 23, 2024

The badge seems to be not working on Win 11 at the moment. I could not see any change on the taskbar icon when a new message arrives while app is minimized to taskbar.

New message do not arrive immediately, they are not loaded until the windows comes back to focus (click on symbol in taskbar). Windows Notifications about new msg are also shown delayed.

Works for me, both badge and native notification except known Talk notifications limitation.

But anyway, this is not about this issue.

@ShGKme
Copy link
Contributor Author

ShGKme commented May 2, 2024

@xataxxx Actually, you were right. I've found this case when there is a race condition with Talk itself that also changed document title with * , which results in skipping flashing.

Thanks!

@ER-EPR
Copy link

ER-EPR commented Jul 5, 2024

I can only see the dot in task bar instead of system tray in the latest release 0.31.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage enhancement New feature or request
Projects
Status: 🧭 Planning evaluation (don't pick)
Development

No branches or pull requests

6 participants