HomePhabricator
Diffusion Comm 17642df70d65

[web] Only update badge when connected

Description

[web] Only update badge when connected

Summary:
Part of ENG-3350.
Changed the tab title/ icon badge logic on web to update only when websocket is connected (otherwise the unreadCound could be outdated). Additionaly we update the badge immediately when connecting to the websocket. The logic is identical to the one on native (native/push/push-handler.react.js:226-232);

Depends on D7327

Test Plan: Open the web app in the browser and in the desktop app (without notifs). Check if sending a message updated the tab title (browser)/ badge (desktop), and reading it removes them.

Reviewers: kamil, inka, ashoat

Reviewed By: ashoat

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D7328

Details

Provenance
Michal Gniadek <michal.gniadek@swmansion.com>Authored on Apr 6 2023, 7:13 AM
Reviewer
ashoat
Differential Revision
D7328: [web] Only update badge when connected
Parents
rCOMMa04df3fc5391: [web] Extract useBadgeHandler
Branches
Unknown
Tags
Unknown

Event Timeline

Michal Gniadek <michal.gniadek@swmansion.com> committed rCOMM17642df70d65: [web] Only update badge when connected (authored by Michal Gniadek <michal.gniadek@swmansion.com>).Apr 11 2023, 7:03 AM