mirror of
https://github.com/bitwarden/browser
synced 2025-12-22 19:23:52 +00:00
[EC-159] [BEEEP] Remove factory providers in Angular DI (#775)
This commit is contained in:
@@ -31,7 +31,7 @@ export class NotificationsService implements NotificationsServiceAbstraction {
|
||||
private apiService: ApiService,
|
||||
private vaultTimeoutService: VaultTimeoutService,
|
||||
private environmentService: EnvironmentService,
|
||||
private logoutCallback: () => Promise<void>,
|
||||
private logoutCallback: (expired: boolean) => Promise<void>,
|
||||
private logService: LogService,
|
||||
private stateService: StateService
|
||||
) {
|
||||
@@ -169,7 +169,7 @@ export class NotificationsService implements NotificationsServiceAbstraction {
|
||||
break;
|
||||
case NotificationType.LogOut:
|
||||
if (isAuthenticated) {
|
||||
this.logoutCallback();
|
||||
this.logoutCallback(true);
|
||||
}
|
||||
break;
|
||||
case NotificationType.SyncSendCreate:
|
||||
|
||||
@@ -29,7 +29,7 @@ export class VaultTimeoutService implements VaultTimeoutServiceAbstraction {
|
||||
private keyConnectorService: KeyConnectorService,
|
||||
private stateService: StateService,
|
||||
private lockedCallback: (userId?: string) => Promise<void> = null,
|
||||
private loggedOutCallback: (userId?: string) => Promise<void> = null
|
||||
private loggedOutCallback: (expired: boolean, userId?: string) => Promise<void> = null
|
||||
) {}
|
||||
|
||||
init(checkOnInterval: boolean) {
|
||||
@@ -116,7 +116,7 @@ export class VaultTimeoutService implements VaultTimeoutServiceAbstraction {
|
||||
|
||||
async logOut(userId?: string): Promise<void> {
|
||||
if (this.loggedOutCallback != null) {
|
||||
await this.loggedOutCallback(userId);
|
||||
await this.loggedOutCallback(false, userId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user