Fix icon status not refreshing on chrome

This commit is contained in:
Robyn MacCallum 2022-03-02 15:59:10 -05:00
parent b6becb3211
commit e56cf962ca
2 changed files with 11 additions and 2 deletions

View File

@ -87,6 +87,7 @@ import VaultTimeoutService from "../services/vaultTimeout.service";
import CommandsBackground from "./commands.background";
import ContextMenusBackground from "./contextMenus.background";
import IdleBackground from "./idle.background";
import IconDetails from "./models/IconDetails";
import { NativeMessagingBackground } from "./nativeMessaging.background";
import NotificationBackground from "./notification.background";
import RuntimeBackground from "./runtime.background";
@ -938,15 +939,15 @@ export default class MainBackground {
return;
}
const options = {
const options: IconDetails = {
path: {
19: "images/icon19" + suffix + ".png",
38: "images/icon38" + suffix + ".png",
},
windowId: windowId,
};
if (this.platformUtilsService.isFirefox()) {
options.windowId = windowId;
await theAction.setIcon(options);
} else if (this.platformUtilsService.isSafari()) {
// Workaround since Safari 14.0.3 returns a pending promise

View File

@ -0,0 +1,8 @@
export default class IconDetails {
path: {
19: string;
38: string;
};
// Chrome does not support windowId, only FireFox
windowId?: number;
}