1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-23 03:22:50 +02: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", () => {
beforeEach(async () => {
await notificationBackground.init();
beforeEach(() => {
notificationBackground.init();
});
it("ignores messages whose command does not match the expected handlers", () => {

View File

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

View File

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

View File

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

View File

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