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

Remove Some Unneccesary Async From Init Methods (#10485)

This commit is contained in:
Justin Baur 2024-08-27 13:12:21 -04:00 committed by GitHub
parent 11eba8d779
commit a7da5bb40f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 8 additions and 8 deletions

View File

@ -137,8 +137,8 @@ describe("NotificationBackground", () => {
}); });
describe("notification bar extension message handlers", () => { describe("notification bar extension message handlers", () => {
beforeEach(async () => { beforeEach(() => {
await notificationBackground.init(); notificationBackground.init();
}); });
it("ignores messages whose command does not match the expected handlers", () => { it("ignores messages whose command does not match the expected handlers", () => {

View File

@ -94,7 +94,7 @@ export default class NotificationBackground {
private accountService: AccountService, private accountService: AccountService,
) {} ) {}
async init() { init() {
if (chrome.runtime == null) { if (chrome.runtime == null) {
return; return;
} }

View File

@ -26,7 +26,7 @@ export default class CommandsBackground {
this.isVivaldi = this.platformUtilsService.isVivaldi(); this.isVivaldi = this.platformUtilsService.isVivaldi();
} }
async init() { init() {
BrowserApi.messageListener("commands.background", (msg: any) => { BrowserApi.messageListener("commands.background", (msg: any) => {
if (msg.command === "unlockCompleted" && msg.data.target === "commands.background") { if (msg.command === "unlockCompleted" && msg.data.target === "commands.background") {
this.processCommand( this.processCommand(

View File

@ -23,7 +23,7 @@ export default class IdleBackground {
this.idle = chrome.idle || (browser != null ? browser.idle : null); this.idle = chrome.idle || (browser != null ? browser.idle : null);
} }
async init() { init() {
if (!this.idle) { if (!this.idle) {
return; return;
} }

View File

@ -1238,11 +1238,11 @@ export default class MainBackground {
await this.vaultTimeoutService.init(true); await this.vaultTimeoutService.init(true);
this.fido2Background.init(); this.fido2Background.init();
await this.runtimeBackground.init(); await this.runtimeBackground.init();
await this.notificationBackground.init(); this.notificationBackground.init();
this.filelessImporterBackground.init(); this.filelessImporterBackground.init();
await this.commandsBackground.init(); this.commandsBackground.init();
this.contextMenusBackground?.init(); this.contextMenusBackground?.init();
await this.idleBackground.init(); this.idleBackground.init();
this.webRequestBackground?.startListening(); this.webRequestBackground?.startListening();
this.syncServiceListener?.listener$().subscribe(); this.syncServiceListener?.listener$().subscribe();
await this.autoSubmitLoginBackground.init(); await this.autoSubmitLoginBackground.init();