mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-26 12:25:20 +01:00
Remove Some Unneccesary Async From Init Methods (#10485)
This commit is contained in:
parent
11eba8d779
commit
a7da5bb40f
@ -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", () => {
|
||||
|
@ -94,7 +94,7 @@ export default class NotificationBackground {
|
||||
private accountService: AccountService,
|
||||
) {}
|
||||
|
||||
async init() {
|
||||
init() {
|
||||
if (chrome.runtime == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -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(
|
||||
|
@ -23,7 +23,7 @@ export default class IdleBackground {
|
||||
this.idle = chrome.idle || (browser != null ? browser.idle : null);
|
||||
}
|
||||
|
||||
async init() {
|
||||
init() {
|
||||
if (!this.idle) {
|
||||
return;
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user