1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

Use messages/events instead of main.unlockCompleted

This commit is contained in:
Daniel James Smith
2021-10-18 16:41:42 +02:00
parent 2699e0f5a0
commit fd8de4ca0c
5 changed files with 33 additions and 29 deletions

View File

@@ -48,6 +48,12 @@ export default class NotificationBackground {
async processMessage(msg: any, sender: chrome.runtime.MessageSender) {
switch (msg.command) {
case 'unlockCompleted':
if (msg.data.target !== 'notification.background') {
return;
}
await this.processMessage(msg.data.commandToRetry.msg, msg.data.commandToRetry.sender);
break;
case 'bgGetDataForTab':
await this.getDataForTab(sender.tab, msg.responseCommand);
break;