mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
Fix noop notification service registration (#13131)
* Re-order the constructor dependencies to match between Noop and Default notification service * Fix test file * One more missed constructor
This commit is contained in:
@@ -906,6 +906,7 @@ const safeProviders: SafeProvider[] = [
|
||||
? NoopNotificationsService
|
||||
: DefaultNotificationsService,
|
||||
deps: [
|
||||
LogService,
|
||||
SyncService,
|
||||
AppIdServiceAbstraction,
|
||||
EnvironmentService,
|
||||
@@ -915,7 +916,6 @@ const safeProviders: SafeProvider[] = [
|
||||
SignalRConnectionService,
|
||||
AuthServiceAbstraction,
|
||||
WebPushConnectionService,
|
||||
LogService,
|
||||
],
|
||||
}),
|
||||
safeProvider({
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
DefaultNotificationsService,
|
||||
DISABLED_NOTIFICATIONS_URL,
|
||||
} from "./default-notifications.service";
|
||||
import { SignalRNotification, SignalRConnectionService } from "./signalr-connection.service";
|
||||
import { SignalRConnectionService, SignalRNotification } from "./signalr-connection.service";
|
||||
import { WebPushConnectionService, WebPushConnector } from "./webpush-connection.service";
|
||||
import { WorkerWebPushConnectionService } from "./worker-webpush-connection.service";
|
||||
|
||||
@@ -92,6 +92,7 @@ describe("NotificationsService", () => {
|
||||
);
|
||||
|
||||
sut = new DefaultNotificationsService(
|
||||
mock<LogService>(),
|
||||
syncService,
|
||||
appIdService,
|
||||
environmentService,
|
||||
@@ -101,7 +102,6 @@ describe("NotificationsService", () => {
|
||||
signalRNotificationConnectionService,
|
||||
authService,
|
||||
webPushNotificationConnectionService,
|
||||
mock<LogService>(),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ export class DefaultNotificationsService implements NotificationsServiceAbstract
|
||||
private activitySubject = new BehaviorSubject<"active" | "inactive">("active");
|
||||
|
||||
constructor(
|
||||
private readonly logService: LogService,
|
||||
private syncService: SyncService,
|
||||
private appIdService: AppIdService,
|
||||
private environmentService: EnvironmentService,
|
||||
@@ -51,7 +52,6 @@ export class DefaultNotificationsService implements NotificationsServiceAbstract
|
||||
private readonly signalRConnectionService: SignalRConnectionService,
|
||||
private readonly authService: AuthService,
|
||||
private readonly webPushConnectionService: WebPushConnectionService,
|
||||
private readonly logService: LogService,
|
||||
) {
|
||||
this.notifications$ = this.accountService.activeAccount$.pipe(
|
||||
map((account) => account?.id),
|
||||
|
||||
Reference in New Issue
Block a user