1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-22 11:45:59 +01:00
bitwarden-browser/apps
Daniel James Smith ec19fc7225
[PS-2072] Browser Badge fixes (#4363)
* Force update of badge icon and text on all windows

Affects MV2 and MV3
No longer pass in tab and windowId to setLoggedOut and setLocked

When the vault is locked or the user logs out, all open windows/tabs need to be updated

Iterating over all active tabs like in 2022.10.1 was missing:

488734577f/apps/browser/src/background/main.background.ts (L859-L867)

Create clearBadgeText function to take care of it.

* Only try to retrieve tab in unlocked state

* Remove lock icon when unlocking on all windows

* Only use windowId to retrieve tab when defined

In MV2 the `windowId` isn't passed into updateBage and fails to retrieve the correct tab to update.

This resorted in the badge not showing a match count in another window.

Fixes #4260

Ensure in MV3 that all listener pass on the windowId if present.

* Fix Firefox private mode

Only pass on the windowId if defined and within Firefox

In private mode the main.background bootstrap-method passes in the windowId

Do not refreshBadge when in private mode

Previously 488734577f/apps/browser/src/background/main.background.ts (L575-L586) setIcon would skip in private mode. Calling refreshBadge without this would update the badge on all windows (normal and private ones)
2023-01-03 18:06:21 +01:00
..
browser [PS-2072] Browser Badge fixes (#4363) 2023-01-03 18:06:21 +01:00
cli Update year in copyrights (#4325) 2022-12-28 21:59:23 +01:00
desktop [SG-58] Avatar color selector (#3691) 2023-01-01 10:30:09 -05:00
web [SG-58] Avatar color selector (#3691) 2023-01-01 10:30:09 -05:00