1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-22 11:45:59 +01:00

Set icon for Private Mode windows that are already open (#2438)

This commit is contained in:
Thomas Rittson 2022-03-10 08:09:11 +10:00 committed by GitHub
parent f7782b6ed5
commit ed61996165
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -498,7 +498,13 @@ export default class MainBackground {
await this.windowsBackground.init();
if (this.platformUtilsService.isFirefox() && !this.isPrivateMode) {
// Set new Private Mode windows to the default icon - they do not share state with the background page
// Set Private Mode windows to the default icon - they do not share state with the background page
const privateWindows = await BrowserApi.getPrivateModeWindows();
privateWindows.forEach(async (win) => {
await this.actionSetIcon(chrome.browserAction, "", win.id);
await this.actionSetIcon(this.sidebarAction, "", win.id);
});
BrowserApi.onWindowCreated(async (win) => {
if (win.incognito) {
await this.actionSetIcon(chrome.browserAction, "", win.id);