1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-06 11:43:51 +00:00

fix(notification-processing): [PM-19877] System Notification Implementation - Fixed renaming of private member variable notificationsService to serverNotificationsService.

This commit is contained in:
Patrick Pimentel
2025-07-24 11:13:17 -04:00
parent 8e98aead30
commit db59947b60
5 changed files with 16 additions and 19 deletions

View File

@@ -20,7 +20,7 @@ export default class IdleBackground {
constructor(
private vaultTimeoutService: VaultTimeoutService,
private notificationsService: ServerNotificationsService,
private serverNotificationsService: ServerNotificationsService,
private accountService: AccountService,
private vaultTimeoutSettingsService: VaultTimeoutSettingsService,
) {
@@ -34,9 +34,9 @@ export default class IdleBackground {
const idleHandler = (newState: string) => {
if (newState === "active") {
this.notificationsService.reconnectFromActivity();
this.serverNotificationsService.reconnectFromActivity();
} else {
this.notificationsService.disconnectFromInactivity();
this.serverNotificationsService.disconnectFromInactivity();
}
};
if (this.idle.onStateChanged && this.idle.setDetectionInterval) {

View File

@@ -346,7 +346,7 @@ export default class MainBackground {
importService: ImportServiceAbstraction;
exportService: VaultExportServiceAbstraction;
searchService: SearchServiceAbstraction;
notificationsService: ServerNotificationsService;
serverNotificationsService: ServerNotificationsService;
systemNotificationService: SystemNotificationsService;
actionsService: ActionsService;
stateService: StateServiceAbstraction;
@@ -1145,7 +1145,7 @@ export default class MainBackground {
this.systemNotificationService = new UnsupportedSystemNotificationsService();
}
this.notificationsService = new DefaultServerNotificationsService(
this.serverNotificationsService = new DefaultServerNotificationsService(
this.logService,
this.syncService,
this.appIdService,
@@ -1216,7 +1216,6 @@ export default class MainBackground {
this,
this.autofillService,
this.platformUtilsService as BrowserPlatformUtilsService,
this.notificationsService,
this.autofillSettingsService,
this.processReloadService,
this.environmentService,
@@ -1255,7 +1254,7 @@ export default class MainBackground {
this.apiService,
this.organizationService,
this.authService,
this.notificationsService,
this.serverNotificationsService,
messageListener,
);
@@ -1332,7 +1331,7 @@ export default class MainBackground {
this.idleBackground = new IdleBackground(
this.vaultTimeoutService,
this.notificationsService,
this.serverNotificationsService,
this.accountService,
this.vaultTimeoutSettingsService,
);
@@ -1390,7 +1389,7 @@ export default class MainBackground {
this.endUserNotificationService = new DefaultEndUserNotificationService(
this.stateProvider,
this.apiService,
this.notificationsService,
this.serverNotificationsService,
this.authService,
this.logService,
);
@@ -1484,7 +1483,7 @@ export default class MainBackground {
setTimeout(async () => {
await this.fullSync(false);
this.backgroundSyncService.init();
this.notificationsService.startListening();
this.serverNotificationsService.startListening();
this.taskService.listenForTaskNotifications();

View File

@@ -15,7 +15,6 @@ import { MessagingService } from "@bitwarden/common/platform/abstractions/messag
import { MessageListener, isExternalMessage } from "@bitwarden/common/platform/messaging";
import { devFlagEnabled } from "@bitwarden/common/platform/misc/flags";
import { Utils } from "@bitwarden/common/platform/misc/utils";
import { ServerNotificationsService } from "@bitwarden/common/platform/notifications";
import { CipherType } from "@bitwarden/common/vault/enums";
import { VaultMessages } from "@bitwarden/common/vault/enums/vault-messages.enum";
import { BiometricsCommands } from "@bitwarden/key-management";
@@ -46,9 +45,8 @@ export default class RuntimeBackground {
private main: MainBackground,
private autofillService: AutofillService,
private platformUtilsService: BrowserPlatformUtilsService,
private notificationsService: ServerNotificationsService,
private autofillSettingsService: AutofillSettingsServiceAbstraction,
private processReloadSerivce: ProcessReloadServiceAbstraction,
private processReloadService: ProcessReloadServiceAbstraction,
private environmentService: BrowserEnvironmentService,
private messagingService: MessagingService,
private logService: LogService,
@@ -241,7 +239,7 @@ export default class RuntimeBackground {
await closeUnlockPopout();
}
this.processReloadSerivce.cancelProcessReload();
this.processReloadService.cancelProcessReload();
if (item) {
await BrowserApi.focusWindow(item.commandToRetry.sender.tab.windowId);

View File

@@ -73,7 +73,7 @@ export class AppComponent implements OnDestroy, OnInit {
private keyService: KeyService,
private collectionService: CollectionService,
private searchService: SearchService,
private notificationsService: ServerNotificationsService,
private serverNotificationsService: ServerNotificationsService,
private stateService: StateService,
private eventUploadService: EventUploadService,
protected policyListService: PolicyListService,
@@ -341,9 +341,9 @@ export class AppComponent implements OnDestroy, OnInit {
private idleStateChanged() {
if (this.isIdle) {
this.notificationsService.disconnectFromInactivity();
this.serverNotificationsService.disconnectFromInactivity();
} else {
this.notificationsService.reconnectFromActivity();
this.serverNotificationsService.reconnectFromActivity();
}
}
}

View File

@@ -28,7 +28,7 @@ import { VersionService } from "../platform/version.service";
export class InitService {
constructor(
@Inject(WINDOW) private win: Window,
private notificationsService: ServerNotificationsService,
private serverNotificationsService: ServerNotificationsService,
private vaultTimeoutService: DefaultVaultTimeoutService,
private i18nService: I18nServiceAbstraction,
private eventUploadService: EventUploadServiceAbstraction,
@@ -67,7 +67,7 @@ export class InitService {
await this.userAutoUnlockKeyService.setUserKeyInMemoryIfAutoUserKeySet(activeAccount.id);
}
this.notificationsService.startListening();
this.serverNotificationsService.startListening();
await this.vaultTimeoutService.init(true);
await this.i18nService.init();
(this.eventUploadService as EventUploadService).init(true);