element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.23k stars 2k forks source link

Windows Task Bar icon is not indicating new unread message #28417

Open mkarg opened 6 days ago

mkarg commented 6 days ago

Steps to reproduce

Outcome

What did you expect?

A badge appears on the task bar icon of the Element Web browser window, indicating there is a new unread message.

What happened instead?

No badge appears on the task bar icon of the Element Web browser windows. You will not understand that you received a new message.

Operating system

Windows

Browser information

Chrome, Edge

URL for webapp

private

Application version

1.11.76

Homeserver

local Synapse

Will you send logs?

No

t3chguy commented 6 days ago

There's no standard Web Browser API to draw on the browser icon. There's a Chrome Windows & Chrome macOS specific one https://developer.mozilla.org/en-US/docs/Web/API/Navigator/setAppBadge#browser_compatibility

Empirically though this API does not work unless you are in PWA mode (i.e you install the app)

image

In which case we already call setAppBadge. https://github.com/element-hq/element-web/blob/develop/src/vector/platform/PWAPlatform.ts#L14-L20